Merge HEAD from master.kernel.org:/pub/scm/linux/kernel/git/paulus/ppc64-2.6

+206 -575
+10 -1
arch/ppc/Makefile
··· 21 21 endif 22 22 23 23 LDFLAGS_vmlinux := -Ttext $(KERNELLOAD) -Bstatic 24 - CPPFLAGS += -Iarch/$(ARCH) 24 + CPPFLAGS += -Iarch/$(ARCH) -Iinclude3 25 25 AFLAGS += -Iarch/$(ARCH) 26 26 CFLAGS += -Iarch/$(ARCH) -msoft-float -pipe \ 27 27 -ffixed-r2 -mmultiple 28 28 CPP = $(CC) -E $(CFLAGS) 29 + # Temporary hack until we have migrated to asm-powerpc 30 + LINUXINCLUDE += -Iinclude3 29 31 30 32 CHECKFLAGS += -D__powerpc__ 31 33 ··· 103 101 104 102 archclean: 105 103 $(Q)$(MAKE) $(clean)=arch/ppc/boot 104 + $(Q)rm -rf include3 106 105 107 106 prepare: include/asm-$(ARCH)/offsets.h checkbin 108 107 ··· 112 109 113 110 include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s 114 111 $(call filechk,gen-asm-offsets) 112 + 113 + # Temporary hack until we have migrated to asm-powerpc 114 + include/asm: include3/asm 115 + include3/asm: 116 + $(Q)if [ ! -d include3 ]; then mkdir -p include3; fi 117 + $(Q)ln -fsn $(srctree)/include/asm-powerpc include3/asm 115 118 116 119 # Use the file '.tmp_gas_check' for binutils tests, as gas won't output 117 120 # to stdout and these checks are run even on install targets.
+9
arch/ppc64/Makefile
··· 55 55 LDFLAGS_vmlinux := -Bstatic -e $(KERNELLOAD) -Ttext $(KERNELLOAD) 56 56 CFLAGS += -msoft-float -pipe -mminimal-toc -mtraceback=none \ 57 57 -mcall-aixdesc 58 + # Temporary hack until we have migrated to asm-powerpc 59 + CPPFLAGS += -Iinclude3 58 60 59 61 GCC_VERSION := $(call cc-version) 60 62 GCC_BROKEN_VEC := $(shell if [ $(GCC_VERSION) -lt 0400 ] ; then echo "y"; fi ;) ··· 114 112 115 113 archclean: 116 114 $(Q)$(MAKE) $(clean)=$(boot) 115 + $(Q)rm -rf include3 117 116 118 117 prepare: include/asm-ppc64/offsets.h 119 118 ··· 123 120 124 121 include/asm-ppc64/offsets.h: arch/ppc64/kernel/asm-offsets.s 125 122 $(call filechk,gen-asm-offsets) 123 + 124 + # Temporary hack until we have migrated to asm-powerpc 125 + include/asm: include3/asm 126 + include3/asm: 127 + $(Q)if [ ! -d include3 ]; then mkdir -p include3; fi; 128 + $(Q)ln -fsn $(srctree)/include/asm-powerpc include3/asm 126 129 127 130 define archhelp 128 131 echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
+3 -3
arch/ppc64/configs/g5_defconfig
··· 103 103 # CONFIG_PREEMPT_VOLUNTARY is not set 104 104 # CONFIG_PREEMPT is not set 105 105 # CONFIG_PREEMPT_BKL is not set 106 - CONFIG_HZ_100=y 107 - # CONFIG_HZ_250 is not set 106 + # CONFIG_HZ_100 is not set 107 + CONFIG_HZ_250=y 108 108 # CONFIG_HZ_1000 is not set 109 - CONFIG_HZ=100 109 + CONFIG_HZ=250 110 110 CONFIG_GENERIC_HARDIRQS=y 111 111 CONFIG_SECCOMP=y 112 112 CONFIG_ISA_DMA_API=y
+3 -3
arch/ppc64/configs/iSeries_defconfig
··· 94 94 # CONFIG_PREEMPT_VOLUNTARY is not set 95 95 # CONFIG_PREEMPT is not set 96 96 # CONFIG_PREEMPT_BKL is not set 97 - CONFIG_HZ_100=y 98 - # CONFIG_HZ_250 is not set 97 + # CONFIG_HZ_100 is not set 98 + CONFIG_HZ_250=y 99 99 # CONFIG_HZ_1000 is not set 100 - CONFIG_HZ=100 100 + CONFIG_HZ=250 101 101 CONFIG_GENERIC_HARDIRQS=y 102 102 CONFIG_LPARCFG=y 103 103 CONFIG_SECCOMP=y
+3 -3
arch/ppc64/configs/maple_defconfig
··· 103 103 # CONFIG_PREEMPT_VOLUNTARY is not set 104 104 # CONFIG_PREEMPT is not set 105 105 # CONFIG_PREEMPT_BKL is not set 106 - CONFIG_HZ_100=y 107 - # CONFIG_HZ_250 is not set 106 + # CONFIG_HZ_100 is not set 107 + CONFIG_HZ_250=y 108 108 # CONFIG_HZ_1000 is not set 109 - CONFIG_HZ=100 109 + CONFIG_HZ=250 110 110 CONFIG_GENERIC_HARDIRQS=y 111 111 CONFIG_SECCOMP=y 112 112 CONFIG_ISA_DMA_API=y
+3 -3
arch/ppc64/configs/pSeries_defconfig
··· 112 112 # CONFIG_PREEMPT_VOLUNTARY is not set 113 113 # CONFIG_PREEMPT is not set 114 114 # CONFIG_PREEMPT_BKL is not set 115 - CONFIG_HZ_100=y 116 - # CONFIG_HZ_250 is not set 115 + # CONFIG_HZ_100 is not set 116 + CONFIG_HZ_250=y 117 117 # CONFIG_HZ_1000 is not set 118 - CONFIG_HZ=100 118 + CONFIG_HZ=250 119 119 CONFIG_EEH=y 120 120 CONFIG_GENERIC_HARDIRQS=y 121 121 CONFIG_PPC_RTAS=y
+3 -3
arch/ppc64/defconfig
··· 114 114 # CONFIG_PREEMPT_VOLUNTARY is not set 115 115 # CONFIG_PREEMPT is not set 116 116 # CONFIG_PREEMPT_BKL is not set 117 - CONFIG_HZ_100=y 118 - # CONFIG_HZ_250 is not set 117 + # CONFIG_HZ_100 is not set 118 + CONFIG_HZ_250=y 119 119 # CONFIG_HZ_1000 is not set 120 - CONFIG_HZ=100 120 + CONFIG_HZ=250 121 121 CONFIG_EEH=y 122 122 CONFIG_GENERIC_HARDIRQS=y 123 123 CONFIG_PPC_RTAS=y
+15 -1
arch/ppc64/kernel/head.S
··· 1269 1269 .= 0x7000 1270 1270 .globl fwnmi_data_area 1271 1271 fwnmi_data_area: 1272 - .space PAGE_SIZE 1272 + 1273 + /* iSeries does not use the FWNMI stuff, so it is safe to put 1274 + * this here, even if we later allow kernels that will boot on 1275 + * both pSeries and iSeries */ 1276 + #ifdef CONFIG_PPC_ISERIES 1277 + . = LPARMAP_PHYS 1278 + #include "lparmap.s" 1279 + /* 1280 + * This ".text" is here for old compilers that generate a trailing 1281 + * .note section when compiling .c files to .s 1282 + */ 1283 + .text 1284 + #endif /* CONFIG_PPC_ISERIES */ 1285 + 1286 + . = 0x8000 1273 1287 1274 1288 /* 1275 1289 * On pSeries, secondary processors spin in the following code.
+16 -5
arch/ppc64/kernel/iSeries_vio.c
··· 68 68 } 69 69 70 70 /** 71 - * vio_register_device: - Register a new vio device. 71 + * vio_register_device_iseries: - Register a new iSeries vio device. 72 72 * @voidev: The device to register. 73 73 */ 74 74 static struct vio_dev *__init vio_register_device_iseries(char *type, ··· 76 76 { 77 77 struct vio_dev *viodev; 78 78 79 - /* allocate a vio_dev for this node */ 79 + /* allocate a vio_dev for this device */ 80 80 viodev = kmalloc(sizeof(struct vio_dev), GFP_KERNEL); 81 81 if (!viodev) 82 82 return NULL; ··· 84 84 85 85 snprintf(viodev->dev.bus_id, BUS_ID_SIZE, "%s%d", type, unit_num); 86 86 87 - return vio_register_device_common(viodev, viodev->dev.bus_id, type, 88 - unit_num, &vio_iommu_table); 87 + viodev->name = viodev->dev.bus_id; 88 + viodev->type = type; 89 + viodev->unit_address = unit_num; 90 + viodev->iommu_table = &vio_iommu_table; 91 + if (vio_register_device(viodev) == NULL) { 92 + kfree(viodev); 93 + return NULL; 94 + } 95 + return viodev; 89 96 } 90 97 91 98 void __init probe_bus_iseries(void) ··· 131 124 return strncmp(dev->type, id->type, strlen(id->type)) == 0; 132 125 } 133 126 127 + static struct vio_bus_ops vio_bus_ops_iseries = { 128 + .match = vio_match_device_iseries, 129 + }; 130 + 134 131 /** 135 132 * vio_bus_init_iseries: - Initialize the iSeries virtual IO bus 136 133 */ ··· 142 131 { 143 132 int err; 144 133 145 - err = vio_bus_init(vio_match_device_iseries, NULL, NULL); 134 + err = vio_bus_init(&vio_bus_ops_iseries); 146 135 if (err == 0) { 147 136 iommu_vio_init(); 148 137 vio_bus_device.iommu_table = &vio_iommu_table;
+1
arch/ppc64/kernel/lparcfg.c
··· 273 273 if (!workbuffer) { 274 274 printk(KERN_ERR "%s %s kmalloc failure at line %d \n", 275 275 __FILE__, __FUNCTION__, __LINE__); 276 + kfree(local_buffer); 276 277 return; 277 278 } 278 279 #ifdef LPARCFG_DEBUG
-2
arch/ppc64/kernel/of_device.c
··· 236 236 struct of_device* of_platform_device_create(struct device_node *np, const char *bus_id) 237 237 { 238 238 struct of_device *dev; 239 - u32 *reg; 240 239 241 240 dev = kmalloc(sizeof(*dev), GFP_KERNEL); 242 241 if (!dev) ··· 249 250 dev->dev.bus = &of_platform_bus_type; 250 251 dev->dev.release = of_release_dev; 251 252 252 - reg = (u32 *)get_property(np, "reg", NULL); 253 253 strlcpy(dev->dev.bus_id, bus_id, BUS_ID_SIZE); 254 254 255 255 if (of_device_register(dev) != 0) {
+13 -6
arch/ppc64/kernel/pSeries_vio.c
··· 19 19 #include <linux/kobject.h> 20 20 #include <asm/iommu.h> 21 21 #include <asm/dma.h> 22 + #include <asm/prom.h> 22 23 #include <asm/vio.h> 23 24 #include <asm/hvcall.h> 24 25 ··· 76 75 device_remove_file(&viodev->dev, &dev_attr_devspec); 77 76 } 78 77 78 + static struct vio_bus_ops vio_bus_ops_pseries = { 79 + .match = vio_match_device_pseries, 80 + .unregister_device = vio_unregister_device_pseries, 81 + .release_device = vio_release_device_pseries, 82 + }; 83 + 79 84 /** 80 85 * vio_bus_init_pseries: - Initialize the pSeries virtual IO bus 81 86 */ ··· 89 82 { 90 83 int err; 91 84 92 - err = vio_bus_init(vio_match_device_pseries, 93 - vio_unregister_device_pseries, 94 - vio_release_device_pseries); 85 + err = vio_bus_init(&vio_bus_ops_pseries); 95 86 if (err == 0) 96 87 probe_bus_pseries(); 97 88 return err; ··· 186 181 } 187 182 188 183 snprintf(viodev->dev.bus_id, BUS_ID_SIZE, "%x", *unit_address); 184 + viodev->name = of_node->name; 185 + viodev->type = of_node->type; 186 + viodev->unit_address = *unit_address; 187 + viodev->iommu_table = vio_build_iommu_table(viodev); 189 188 190 189 /* register with generic device framework */ 191 - if (vio_register_device_common(viodev, of_node->name, of_node->type, 192 - *unit_address, vio_build_iommu_table(viodev)) 193 - == NULL) { 190 + if (vio_register_device(viodev) == NULL) { 194 191 /* XXX free TCE table */ 195 192 kfree(viodev); 196 193 return NULL;
+4 -1
arch/ppc64/kernel/prom_init.c
··· 892 892 if ( RELOC(of_platform) == PLATFORM_PSERIES_LPAR ) 893 893 RELOC(alloc_top) = RELOC(rmo_top); 894 894 else 895 - RELOC(alloc_top) = RELOC(rmo_top) = min(0x40000000ul, RELOC(ram_top)); 895 + /* Some RS64 machines have buggy firmware where claims up at 1GB 896 + * fails. Cap at 768MB as a workaround. Still plenty of room. 897 + */ 898 + RELOC(alloc_top) = RELOC(rmo_top) = min(0x30000000ul, RELOC(ram_top)); 896 899 897 900 prom_printf("memory layout at init:\n"); 898 901 prom_printf(" memory_limit : %x (16 MB aligned)\n", RELOC(prom_memory_limit));
+27 -46
arch/ppc64/kernel/vio.c
··· 32 32 .dev.bus = &vio_bus_type, 33 33 }; 34 34 35 - static int (*is_match)(const struct vio_device_id *id, 36 - const struct vio_dev *dev); 37 - static void (*unregister_device_callback)(struct vio_dev *dev); 38 - static void (*release_device_callback)(struct device *dev); 35 + static struct vio_bus_ops vio_bus_ops; 39 36 40 - /* convert from struct device to struct vio_dev and pass to driver. 37 + /* 38 + * Convert from struct device to struct vio_dev and pass to driver. 41 39 * dev->driver has already been set by generic code because vio_bus_match 42 - * succeeded. */ 40 + * succeeded. 41 + */ 43 42 static int vio_bus_probe(struct device *dev) 44 43 { 45 44 struct vio_dev *viodev = to_vio_dev(dev); ··· 50 51 return error; 51 52 52 53 id = vio_match_device(viodrv->id_table, viodev); 53 - if (id) { 54 + if (id) 54 55 error = viodrv->probe(viodev, id); 55 - } 56 56 57 57 return error; 58 58 } ··· 62 64 struct vio_dev *viodev = to_vio_dev(dev); 63 65 struct vio_driver *viodrv = to_vio_driver(dev->driver); 64 66 65 - if (viodrv->remove) { 67 + if (viodrv->remove) 66 68 return viodrv->remove(viodev); 67 - } 68 69 69 70 /* driver can't remove */ 70 71 return 1; ··· 99 102 EXPORT_SYMBOL(vio_unregister_driver); 100 103 101 104 /** 102 - * vio_match_device: - Tell if a VIO device has a matching VIO device id structure. 103 - * @ids: array of VIO device id structures to search in 104 - * @dev: the VIO device structure to match against 105 + * vio_match_device: - Tell if a VIO device has a matching 106 + * VIO device id structure. 107 + * @ids: array of VIO device id structures to search in 108 + * @dev: the VIO device structure to match against 105 109 * 106 110 * Used by a driver to check whether a VIO device present in the 107 111 * system is in its list of supported devices. Returns the matching 108 112 * vio_device_id structure or NULL if there is no match. 109 113 */ 110 - static const struct vio_device_id * vio_match_device(const struct vio_device_id *ids, 111 - const struct vio_dev *dev) 114 + static const struct vio_device_id *vio_match_device( 115 + const struct vio_device_id *ids, const struct vio_dev *dev) 112 116 { 113 - while (ids->type) { 114 - if (is_match(ids, dev)) 117 + while (ids->type[0] != '\0') { 118 + if (vio_bus_ops.match(ids, dev)) 115 119 return ids; 116 120 ids++; 117 121 } ··· 122 124 /** 123 125 * vio_bus_init: - Initialize the virtual IO bus 124 126 */ 125 - int __init vio_bus_init(int (*match_func)(const struct vio_device_id *id, 126 - const struct vio_dev *dev), 127 - void (*unregister_dev)(struct vio_dev *), 128 - void (*release_dev)(struct device *)) 127 + int __init vio_bus_init(struct vio_bus_ops *ops) 129 128 { 130 129 int err; 131 130 132 - is_match = match_func; 133 - unregister_device_callback = unregister_dev; 134 - release_device_callback = release_dev; 131 + vio_bus_ops = *ops; 135 132 136 133 err = bus_register(&vio_bus_type); 137 134 if (err) { ··· 134 141 return err; 135 142 } 136 143 137 - /* the fake parent of all vio devices, just to give us 144 + /* 145 + * The fake parent of all vio devices, just to give us 138 146 * a nice directory 139 147 */ 140 148 err = device_register(&vio_bus_device.dev); ··· 151 157 /* vio_dev refcount hit 0 */ 152 158 static void __devinit vio_dev_release(struct device *dev) 153 159 { 154 - if (release_device_callback) 155 - release_device_callback(dev); 160 + if (vio_bus_ops.release_device) 161 + vio_bus_ops.release_device(dev); 156 162 kfree(to_vio_dev(dev)); 157 163 } 158 164 159 - static ssize_t viodev_show_name(struct device *dev, struct device_attribute *attr, char *buf) 165 + static ssize_t viodev_show_name(struct device *dev, 166 + struct device_attribute *attr, char *buf) 160 167 { 161 168 return sprintf(buf, "%s\n", to_vio_dev(dev)->name); 162 169 } 163 170 DEVICE_ATTR(name, S_IRUSR | S_IRGRP | S_IROTH, viodev_show_name, NULL); 164 171 165 - struct vio_dev * __devinit vio_register_device_common( 166 - struct vio_dev *viodev, char *name, char *type, 167 - uint32_t unit_address, struct iommu_table *iommu_table) 172 + struct vio_dev * __devinit vio_register_device(struct vio_dev *viodev) 168 173 { 169 - viodev->name = name; 170 - viodev->type = type; 171 - viodev->unit_address = unit_address; 172 - viodev->iommu_table = iommu_table; 173 174 /* init generic 'struct device' fields: */ 174 175 viodev->dev.parent = &vio_bus_device.dev; 175 176 viodev->dev.bus = &vio_bus_type; ··· 183 194 184 195 void __devinit vio_unregister_device(struct vio_dev *viodev) 185 196 { 186 - if (unregister_device_callback) 187 - unregister_device_callback(viodev); 197 + if (vio_bus_ops.unregister_device) 198 + vio_bus_ops.unregister_device(viodev); 188 199 device_remove_file(&viodev->dev, &dev_attr_name); 189 200 device_unregister(&viodev->dev); 190 201 } ··· 251 262 const struct vio_dev *vio_dev = to_vio_dev(dev); 252 263 struct vio_driver *vio_drv = to_vio_driver(drv); 253 264 const struct vio_device_id *ids = vio_drv->id_table; 254 - const struct vio_device_id *found_id; 255 265 256 - if (!ids) 257 - return 0; 258 - 259 - found_id = vio_match_device(ids, vio_dev); 260 - if (found_id) 261 - return 1; 262 - 263 - return 0; 266 + return (ids != NULL) && (vio_match_device(ids, vio_dev) != NULL); 264 267 } 265 268 266 269 struct bus_type vio_bus_type = {
+1 -3
arch/ppc64/mm/hash_low.S
··· 129 129 * code rather than call a C function...) 130 130 */ 131 131 BEGIN_FTR_SECTION 132 - BEGIN_FTR_SECTION 133 132 mr r4,r30 134 133 mr r5,r7 135 134 bl .hash_page_do_lazy_icache 136 - END_FTR_SECTION_IFSET(CPU_FTR_NOEXECUTE) 137 - END_FTR_SECTION_IFCLR(CPU_FTR_COHERENT_ICACHE) 135 + END_FTR_SECTION(CPU_FTR_NOEXECUTE|CPU_FTR_COHERENT_ICACHE, CPU_FTR_NOEXECUTE) 138 136 139 137 /* At this point, r3 contains new PP bits, save them in 140 138 * place of "access" in the param area (sic)
+1
arch/ppc64/oprofile/common.c
··· 153 153 154 154 case PV_970: 155 155 case PV_970FX: 156 + case PV_970MP: 156 157 model = &op_model_power4; 157 158 model->num_counters = 8; 158 159 ops->cpu_type = "ppc64/970";
+1 -1
drivers/block/viodasd.c
··· 776 776 */ 777 777 static struct vio_device_id viodasd_device_table[] __devinitdata = { 778 778 { "viodasd", "" }, 779 - { 0, } 779 + { "", "" } 780 780 }; 781 781 782 782 MODULE_DEVICE_TABLE(vio, viodasd_device_table);
+1 -1
drivers/cdrom/viocd.c
··· 734 734 */ 735 735 static struct vio_device_id viocd_device_table[] __devinitdata = { 736 736 { "viocd", "" }, 737 - { 0, } 737 + { "", "" } 738 738 }; 739 739 740 740 MODULE_DEVICE_TABLE(vio, viocd_device_table);
+1 -1
drivers/char/hvc_vio.c
··· 39 39 40 40 static struct vio_device_id hvc_driver_table[] __devinitdata = { 41 41 {"serial", "hvterm1"}, 42 - { NULL, } 42 + { "", "" } 43 43 }; 44 44 MODULE_DEVICE_TABLE(vio, hvc_driver_table); 45 45
+1 -1
drivers/char/hvcs.c
··· 527 527 528 528 static struct vio_device_id hvcs_driver_table[] __devinitdata= { 529 529 {"serial-server", "hvterm2"}, 530 - { NULL, } 530 + { "", "" } 531 531 }; 532 532 MODULE_DEVICE_TABLE(vio, hvcs_driver_table); 533 533
+1 -1
drivers/char/viotape.c
··· 991 991 */ 992 992 static struct vio_device_id viotape_device_table[] __devinitdata = { 993 993 { "viotape", "" }, 994 - { 0, } 994 + { "", "" } 995 995 }; 996 996 997 997 MODULE_DEVICE_TABLE(vio, viotape_device_table);
+1 -1
drivers/net/ibmveth.c
··· 1144 1144 1145 1145 static struct vio_device_id ibmveth_device_table[] __devinitdata= { 1146 1146 { "network", "IBM,l-lan"}, 1147 - { 0,} 1147 + { "", "" } 1148 1148 }; 1149 1149 1150 1150 MODULE_DEVICE_TABLE(vio, ibmveth_device_table);
+1 -1
drivers/net/iseries_veth.c
··· 1370 1370 */ 1371 1371 static struct vio_device_id veth_device_table[] __devinitdata = { 1372 1372 { "vlan", "" }, 1373 - { NULL, NULL } 1373 + { "", "" } 1374 1374 }; 1375 1375 MODULE_DEVICE_TABLE(vio, veth_device_table); 1376 1376
+1 -1
drivers/scsi/ibmvscsi/ibmvscsi.c
··· 1442 1442 */ 1443 1443 static struct vio_device_id ibmvscsi_device_table[] __devinitdata = { 1444 1444 {"vscsi", "IBM,v-scsi"}, 1445 - {0,} 1445 + { "", "" } 1446 1446 }; 1447 1447 1448 1448 MODULE_DEVICE_TABLE(vio, ibmvscsi_device_table);
+1
drivers/scsi/ibmvscsi/rpa_vscsi.c
··· 28 28 */ 29 29 30 30 #include <asm/vio.h> 31 + #include <asm/prom.h> 31 32 #include <asm/iommu.h> 32 33 #include <asm/hvcall.h> 33 34 #include <linux/dma-mapping.h>
+1
include/asm-powerpc/cputime.h
··· 1 + #include <asm-generic/cputime.h>
+1
include/asm-powerpc/emergency-restart.h
··· 1 + #include <asm-generic/emergency-restart.h>
+1
include/asm-powerpc/percpu.h
··· 1 + #include <asm-generic/percpu.h>
+1
include/asm-powerpc/resource.h
··· 1 + #include <asm-generic/resource.h>
+1 -1
include/asm-ppc/8253pit.h include/asm-powerpc/8253pit.h
··· 5 5 #ifndef _8253PIT_H 6 6 #define _8253PIT_H 7 7 8 - #define PIT_TICK_RATE 1193182UL 8 + #define PIT_TICK_RATE 1193182UL 9 9 10 10 #endif
include/asm-ppc/agp.h include/asm-powerpc/agp.h
-6
include/asm-ppc/cputime.h
··· 1 - #ifndef __PPC_CPUTIME_H 2 - #define __PPC_CPUTIME_H 3 - 4 - #include <asm-generic/cputime.h> 5 - 6 - #endif /* __PPC_CPUTIME_H */
include/asm-ppc/div64.h include/asm-powerpc/div64.h
-6
include/asm-ppc/emergency-restart.h
··· 1 - #ifndef _ASM_EMERGENCY_RESTART_H 2 - #define _ASM_EMERGENCY_RESTART_H 3 - 4 - #include <asm-generic/emergency-restart.h> 5 - 6 - #endif /* _ASM_EMERGENCY_RESTART_H */
include/asm-ppc/errno.h include/asm-powerpc/errno.h
-1
include/asm-ppc/hdreg.h
··· 1 - #include <asm-generic/hdreg.h>
include/asm-ppc/ioctl.h include/asm-powerpc/ioctl.h
include/asm-ppc/ioctls.h include/asm-powerpc/ioctls.h
include/asm-ppc/ipc.h include/asm-powerpc/ipc.h
include/asm-ppc/linkage.h include/asm-powerpc/linkage.h
-6
include/asm-ppc/local.h
··· 1 - #ifndef __PPC_LOCAL_H 2 - #define __PPC_LOCAL_H 3 - 4 - #include <asm-generic/local.h> 5 - 6 - #endif /* __PPC_LOCAL_H */
include/asm-ppc/namei.h include/asm-powerpc/namei.h
-6
include/asm-ppc/percpu.h
··· 1 - #ifndef __ARCH_PPC_PERCPU__ 2 - #define __ARCH_PPC_PERCPU__ 3 - 4 - #include <asm-generic/percpu.h> 5 - 6 - #endif /* __ARCH_PPC_PERCPU__ */
include/asm-ppc/poll.h include/asm-powerpc/poll.h
-6
include/asm-ppc/resource.h
··· 1 - #ifndef _PPC_RESOURCE_H 2 - #define _PPC_RESOURCE_H 3 - 4 - #include <asm-generic/resource.h> 5 - 6 - #endif
include/asm-ppc/shmparam.h include/asm-powerpc/shmparam.h
include/asm-ppc/string.h include/asm-powerpc/string.h
include/asm-ppc/unaligned.h include/asm-powerpc/unaligned.h
include/asm-ppc/xor.h include/asm-powerpc/xor.h
-10
include/asm-ppc64/8253pit.h
··· 1 - /* 2 - * 8253/8254 Programmable Interval Timer 3 - */ 4 - 5 - #ifndef _8253PIT_H 6 - #define _8253PIT_H 7 - 8 - #define PIT_TICK_RATE 1193182UL 9 - 10 - #endif
-23
include/asm-ppc64/agp.h
··· 1 - #ifndef AGP_H 2 - #define AGP_H 1 3 - 4 - #include <asm/io.h> 5 - 6 - /* nothing much needed here */ 7 - 8 - #define map_page_into_agp(page) 9 - #define unmap_page_from_agp(page) 10 - #define flush_agp_mappings() 11 - #define flush_agp_cache() mb() 12 - 13 - /* Convert a physical address to an address suitable for the GART. */ 14 - #define phys_to_gart(x) (x) 15 - #define gart_to_phys(x) (x) 16 - 17 - /* GATT allocation. Returns/accepts GATT kernel virtual address. */ 18 - #define alloc_gatt_pages(order) \ 19 - ((char *)__get_free_pages(GFP_KERNEL, (order))) 20 - #define free_gatt_pages(table, order) \ 21 - free_pages((unsigned long)(table), (order)) 22 - 23 - #endif
-6
include/asm-ppc64/cputime.h
··· 1 - #ifndef __PPC_CPUTIME_H 2 - #define __PPC_CPUTIME_H 3 - 4 - #include <asm-generic/cputime.h> 5 - 6 - #endif /* __PPC_CPUTIME_H */
-1
include/asm-ppc64/div64.h
··· 1 - #include <asm-generic/div64.h>
-6
include/asm-ppc64/emergency-restart.h
··· 1 - #ifndef _ASM_EMERGENCY_RESTART_H 2 - #define _ASM_EMERGENCY_RESTART_H 3 - 4 - #include <asm-generic/emergency-restart.h> 5 - 6 - #endif /* _ASM_EMERGENCY_RESTART_H */
-18
include/asm-ppc64/errno.h
··· 1 - #ifndef _PPC64_ERRNO_H 2 - #define _PPC64_ERRNO_H 3 - 4 - /* 5 - * This program is free software; you can redistribute it and/or 6 - * modify it under the terms of the GNU General Public License 7 - * as published by the Free Software Foundation; either version 8 - * 2 of the License, or (at your option) any later version. 9 - */ 10 - 11 - #include <asm-generic/errno.h> 12 - 13 - #undef EDEADLOCK 14 - #define EDEADLOCK 58 /* File locking deadlock error */ 15 - 16 - #define _LAST_ERRNO 516 17 - 18 - #endif
-1
include/asm-ppc64/hdreg.h
··· 1 - #include <asm-generic/hdreg.h>
-74
include/asm-ppc64/ioctl.h
··· 1 - #ifndef _PPC64_IOCTL_H 2 - #define _PPC64_IOCTL_H 3 - 4 - 5 - /* 6 - * This was copied from the alpha as it's a bit cleaner there. 7 - * -- Cort 8 - * 9 - * This program is free software; you can redistribute it and/or 10 - * modify it under the terms of the GNU General Public License 11 - * as published by the Free Software Foundation; either version 12 - * 2 of the License, or (at your option) any later version. 13 - */ 14 - 15 - #define _IOC_NRBITS 8 16 - #define _IOC_TYPEBITS 8 17 - #define _IOC_SIZEBITS 13 18 - #define _IOC_DIRBITS 3 19 - 20 - #define _IOC_NRMASK ((1 << _IOC_NRBITS)-1) 21 - #define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1) 22 - #define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1) 23 - #define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1) 24 - 25 - #define _IOC_NRSHIFT 0 26 - #define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS) 27 - #define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS) 28 - #define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS) 29 - 30 - /* 31 - * Direction bits _IOC_NONE could be 0, but OSF/1 gives it a bit. 32 - * And this turns out useful to catch old ioctl numbers in header 33 - * files for us. 34 - */ 35 - #define _IOC_NONE 1U 36 - #define _IOC_READ 2U 37 - #define _IOC_WRITE 4U 38 - 39 - #define _IOC(dir,type,nr,size) \ 40 - (((dir) << _IOC_DIRSHIFT) | \ 41 - ((type) << _IOC_TYPESHIFT) | \ 42 - ((nr) << _IOC_NRSHIFT) | \ 43 - ((size) << _IOC_SIZESHIFT)) 44 - 45 - /* provoke compile error for invalid uses of size argument */ 46 - extern unsigned int __invalid_size_argument_for_IOC; 47 - #define _IOC_TYPECHECK(t) \ 48 - ((sizeof(t) == sizeof(t[1]) && \ 49 - sizeof(t) < (1 << _IOC_SIZEBITS)) ? \ 50 - sizeof(t) : __invalid_size_argument_for_IOC) 51 - 52 - /* used to create numbers */ 53 - #define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0) 54 - #define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),(_IOC_TYPECHECK(size))) 55 - #define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size))) 56 - #define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size))) 57 - #define _IOR_BAD(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size)) 58 - #define _IOW_BAD(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size)) 59 - #define _IOWR_BAD(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size)) 60 - 61 - /* used to decode them.. */ 62 - #define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK) 63 - #define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK) 64 - #define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK) 65 - #define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK) 66 - 67 - /* various drivers, such as the pcmcia stuff, need these... */ 68 - #define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT) 69 - #define IOC_OUT (_IOC_READ << _IOC_DIRSHIFT) 70 - #define IOC_INOUT ((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT) 71 - #define IOCSIZE_MASK (_IOC_SIZEMASK << _IOC_SIZESHIFT) 72 - #define IOCSIZE_SHIFT (_IOC_SIZESHIFT) 73 - 74 - #endif /* _PPC64_IOCTL_H */
-114
include/asm-ppc64/ioctls.h
··· 1 - #ifndef _ASM_PPC64_IOCTLS_H 2 - #define _ASM_PPC64_IOCTLS_H 3 - 4 - /* 5 - * This program is free software; you can redistribute it and/or 6 - * modify it under the terms of the GNU General Public License 7 - * as published by the Free Software Foundation; either version 8 - * 2 of the License, or (at your option) any later version. 9 - */ 10 - 11 - #include <asm/ioctl.h> 12 - 13 - #define FIOCLEX _IO('f', 1) 14 - #define FIONCLEX _IO('f', 2) 15 - #define FIOASYNC _IOW('f', 125, int) 16 - #define FIONBIO _IOW('f', 126, int) 17 - #define FIONREAD _IOR('f', 127, int) 18 - #define TIOCINQ FIONREAD 19 - #define FIOQSIZE _IOR('f', 128, loff_t) 20 - 21 - #define TIOCGETP _IOR('t', 8, struct sgttyb) 22 - #define TIOCSETP _IOW('t', 9, struct sgttyb) 23 - #define TIOCSETN _IOW('t', 10, struct sgttyb) /* TIOCSETP wo flush */ 24 - 25 - #define TIOCSETC _IOW('t', 17, struct tchars) 26 - #define TIOCGETC _IOR('t', 18, struct tchars) 27 - #define TCGETS _IOR('t', 19, struct termios) 28 - #define TCSETS _IOW('t', 20, struct termios) 29 - #define TCSETSW _IOW('t', 21, struct termios) 30 - #define TCSETSF _IOW('t', 22, struct termios) 31 - 32 - #define TCGETA _IOR('t', 23, struct termio) 33 - #define TCSETA _IOW('t', 24, struct termio) 34 - #define TCSETAW _IOW('t', 25, struct termio) 35 - #define TCSETAF _IOW('t', 28, struct termio) 36 - 37 - #define TCSBRK _IO('t', 29) 38 - #define TCXONC _IO('t', 30) 39 - #define TCFLSH _IO('t', 31) 40 - 41 - #define TIOCSWINSZ _IOW('t', 103, struct winsize) 42 - #define TIOCGWINSZ _IOR('t', 104, struct winsize) 43 - #define TIOCSTART _IO('t', 110) /* start output, like ^Q */ 44 - #define TIOCSTOP _IO('t', 111) /* stop output, like ^S */ 45 - #define TIOCOUTQ _IOR('t', 115, int) /* output queue size */ 46 - 47 - #define TIOCGLTC _IOR('t', 116, struct ltchars) 48 - #define TIOCSLTC _IOW('t', 117, struct ltchars) 49 - #define TIOCSPGRP _IOW('t', 118, int) 50 - #define TIOCGPGRP _IOR('t', 119, int) 51 - 52 - #define TIOCEXCL 0x540C 53 - #define TIOCNXCL 0x540D 54 - #define TIOCSCTTY 0x540E 55 - 56 - #define TIOCSTI 0x5412 57 - #define TIOCMGET 0x5415 58 - #define TIOCMBIS 0x5416 59 - #define TIOCMBIC 0x5417 60 - #define TIOCMSET 0x5418 61 - # define TIOCM_LE 0x001 62 - # define TIOCM_DTR 0x002 63 - # define TIOCM_RTS 0x004 64 - # define TIOCM_ST 0x008 65 - # define TIOCM_SR 0x010 66 - # define TIOCM_CTS 0x020 67 - # define TIOCM_CAR 0x040 68 - # define TIOCM_RNG 0x080 69 - # define TIOCM_DSR 0x100 70 - # define TIOCM_CD TIOCM_CAR 71 - # define TIOCM_RI TIOCM_RNG 72 - 73 - #define TIOCGSOFTCAR 0x5419 74 - #define TIOCSSOFTCAR 0x541A 75 - #define TIOCLINUX 0x541C 76 - #define TIOCCONS 0x541D 77 - #define TIOCGSERIAL 0x541E 78 - #define TIOCSSERIAL 0x541F 79 - #define TIOCPKT 0x5420 80 - # define TIOCPKT_DATA 0 81 - # define TIOCPKT_FLUSHREAD 1 82 - # define TIOCPKT_FLUSHWRITE 2 83 - # define TIOCPKT_STOP 4 84 - # define TIOCPKT_START 8 85 - # define TIOCPKT_NOSTOP 16 86 - # define TIOCPKT_DOSTOP 32 87 - 88 - 89 - #define TIOCNOTTY 0x5422 90 - #define TIOCSETD 0x5423 91 - #define TIOCGETD 0x5424 92 - #define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ 93 - #define TIOCSBRK 0x5427 /* BSD compatibility */ 94 - #define TIOCCBRK 0x5428 /* BSD compatibility */ 95 - #define TIOCGSID 0x5429 /* Return the session ID of FD */ 96 - #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ 97 - #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ 98 - 99 - #define TIOCSERCONFIG 0x5453 100 - #define TIOCSERGWILD 0x5454 101 - #define TIOCSERSWILD 0x5455 102 - #define TIOCGLCKTRMIOS 0x5456 103 - #define TIOCSLCKTRMIOS 0x5457 104 - #define TIOCSERGSTRUCT 0x5458 /* For debugging only */ 105 - #define TIOCSERGETLSR 0x5459 /* Get line status register */ 106 - /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ 107 - # define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ 108 - #define TIOCSERGETMULTI 0x545A /* Get multiport config */ 109 - #define TIOCSERSETMULTI 0x545B /* Set multiport config */ 110 - 111 - #define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */ 112 - #define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ 113 - 114 - #endif /* _ASM_PPC64_IOCTLS_H */
-1
include/asm-ppc64/ipc.h
··· 1 - #include <asm-generic/ipc.h>
-6
include/asm-ppc64/linkage.h
··· 1 - #ifndef __ASM_LINKAGE_H 2 - #define __ASM_LINKAGE_H 3 - 4 - /* Nothing to see here... */ 5 - 6 - #endif
include/asm-ppc64/local.h include/asm-powerpc/local.h
-23
include/asm-ppc64/namei.h
··· 1 - /* 2 - * linux/include/asm-ppc/namei.h 3 - * Adapted from linux/include/asm-alpha/namei.h 4 - * 5 - * Included from linux/fs/namei.c 6 - * 7 - * This program is free software; you can redistribute it and/or 8 - * modify it under the terms of the GNU General Public License 9 - * as published by the Free Software Foundation; either version 10 - * 2 of the License, or (at your option) any later version. 11 - */ 12 - 13 - #ifndef __PPC64_NAMEI_H 14 - #define __PPC64_NAMEI_H 15 - 16 - /* This dummy routine maybe changed to something useful 17 - * for /usr/gnemul/ emulation stuff. 18 - * Look at asm-sparc/namei.h for details. 19 - */ 20 - 21 - #define __emul_prefix() NULL 22 - 23 - #endif /* __PPC64_NAMEI_H */
+3 -1
include/asm-ppc64/param.h
··· 1 1 #ifndef _ASM_PPC64_PARAM_H 2 2 #define _ASM_PPC64_PARAM_H 3 3 4 + #include <linux/config.h> 5 + 4 6 /* 5 7 * This program is free software; you can redistribute it and/or 6 8 * modify it under the terms of the GNU General Public License ··· 11 9 */ 12 10 13 11 #ifdef __KERNEL__ 14 - # define HZ 1000 /* Internal kernel timer frequency */ 12 + # define HZ CONFIG_HZ /* Internal kernel timer frequency */ 15 13 # define USER_HZ 100 /* .. some user interfaces are in "ticks" */ 16 14 # define CLOCKS_PER_SEC (USER_HZ) /* like times() */ 17 15 #endif
-6
include/asm-ppc64/percpu.h
··· 1 - #ifndef __ARCH_PPC64_PERCPU__ 2 - #define __ARCH_PPC64_PERCPU__ 3 - 4 - #include <asm-generic/percpu.h> 5 - 6 - #endif /* __ARCH_PPC64_PERCPU__ */
+2
include/asm-ppc64/pgtable.h
··· 489 489 490 490 extern void paging_init(void); 491 491 492 + #ifdef CONFIG_HUGETLB_PAGE 492 493 #define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) \ 493 494 free_pgd_range(tlb, addr, end, floor, ceiling) 495 + #endif 494 496 495 497 /* 496 498 * This gets called at the end of handling a page fault, when
-32
include/asm-ppc64/poll.h
··· 1 - #ifndef __PPC64_POLL_H 2 - #define __PPC64_POLL_H 3 - 4 - /* 5 - * Copyright (C) 2001 PPC64 Team, IBM Corp 6 - * 7 - * This program is free software; you can redistribute it and/or 8 - * modify it under the terms of the GNU General Public License 9 - * as published by the Free Software Foundation; either version 10 - * 2 of the License, or (at your option) any later version. 11 - */ 12 - 13 - #define POLLIN 0x0001 14 - #define POLLPRI 0x0002 15 - #define POLLOUT 0x0004 16 - #define POLLERR 0x0008 17 - #define POLLHUP 0x0010 18 - #define POLLNVAL 0x0020 19 - #define POLLRDNORM 0x0040 20 - #define POLLRDBAND 0x0080 21 - #define POLLWRNORM 0x0100 22 - #define POLLWRBAND 0x0200 23 - #define POLLMSG 0x0400 24 - #define POLLREMOVE 0x1000 25 - 26 - struct pollfd { 27 - int fd; 28 - short events; 29 - short revents; 30 - }; 31 - 32 - #endif /* __PPC64_POLL_H */
+1
include/asm-ppc64/processor.h
··· 268 268 #define PV_970FX 0x003C 269 269 #define PV_630 0x0040 270 270 #define PV_630p 0x0041 271 + #define PV_970MP 0x0044 271 272 #define PV_BE 0x0070 272 273 273 274 /* Platforms supported by PPC64 */
-6
include/asm-ppc64/resource.h
··· 1 - #ifndef _PPC64_RESOURCE_H 2 - #define _PPC64_RESOURCE_H 3 - 4 - #include <asm-generic/resource.h> 5 - 6 - #endif /* _PPC64_RESOURCE_H */
-13
include/asm-ppc64/shmparam.h
··· 1 - #ifndef _PPC64_SHMPARAM_H 2 - #define _PPC64_SHMPARAM_H 3 - 4 - /* 5 - * This program is free software; you can redistribute it and/or 6 - * modify it under the terms of the GNU General Public License 7 - * as published by the Free Software Foundation; either version 8 - * 2 of the License, or (at your option) any later version. 9 - */ 10 - 11 - #define SHMLBA PAGE_SIZE /* attach addr a multiple of this */ 12 - 13 - #endif /* _PPC64_SHMPARAM_H */
-35
include/asm-ppc64/string.h
··· 1 - #ifndef _PPC64_STRING_H_ 2 - #define _PPC64_STRING_H_ 3 - 4 - /* 5 - * This program is free software; you can redistribute it and/or 6 - * modify it under the terms of the GNU General Public License 7 - * as published by the Free Software Foundation; either version 8 - * 2 of the License, or (at your option) any later version. 9 - */ 10 - 11 - #define __HAVE_ARCH_STRCPY 12 - #define __HAVE_ARCH_STRNCPY 13 - #define __HAVE_ARCH_STRLEN 14 - #define __HAVE_ARCH_STRCMP 15 - #define __HAVE_ARCH_STRCAT 16 - #define __HAVE_ARCH_MEMSET 17 - #define __HAVE_ARCH_MEMCPY 18 - #define __HAVE_ARCH_MEMMOVE 19 - #define __HAVE_ARCH_MEMCMP 20 - #define __HAVE_ARCH_MEMCHR 21 - 22 - extern int strcasecmp(const char *, const char *); 23 - extern int strncasecmp(const char *, const char *, int); 24 - extern char * strcpy(char *,const char *); 25 - extern char * strncpy(char *,const char *, __kernel_size_t); 26 - extern __kernel_size_t strlen(const char *); 27 - extern int strcmp(const char *,const char *); 28 - extern char * strcat(char *, const char *); 29 - extern void * memset(void *,int,__kernel_size_t); 30 - extern void * memcpy(void *,const void *,__kernel_size_t); 31 - extern void * memmove(void *,const void *,__kernel_size_t); 32 - extern int memcmp(const void *,const void *,__kernel_size_t); 33 - extern void * memchr(const void *,int,__kernel_size_t); 34 - 35 - #endif /* _PPC64_STRING_H_ */
-21
include/asm-ppc64/unaligned.h
··· 1 - #ifndef __PPC64_UNALIGNED_H 2 - #define __PPC64_UNALIGNED_H 3 - 4 - /* 5 - * The PowerPC can do unaligned accesses itself in big endian mode. 6 - * 7 - * The strange macros are there to make sure these can't 8 - * be misused in a way that makes them not work on other 9 - * architectures where unaligned accesses aren't as simple. 10 - * 11 - * This program is free software; you can redistribute it and/or 12 - * modify it under the terms of the GNU General Public License 13 - * as published by the Free Software Foundation; either version 14 - * 2 of the License, or (at your option) any later version. 15 - */ 16 - 17 - #define get_unaligned(ptr) (*(ptr)) 18 - 19 - #define put_unaligned(val, ptr) ((void)( *(ptr) = (val) )) 20 - 21 - #endif /* __PPC64_UNALIGNED_H */
+49 -56
include/asm-ppc64/vio.h
··· 19 19 #include <linux/errno.h> 20 20 #include <linux/device.h> 21 21 #include <linux/dma-mapping.h> 22 + #include <linux/mod_devicetable.h> 23 + 22 24 #include <asm/hvcall.h> 23 - #include <asm/prom.h> 24 25 #include <asm/scatterlist.h> 25 - /* 26 + 27 + /* 26 28 * Architecture-specific constants for drivers to 27 29 * extract attributes of the device using vio_get_attribute() 28 - */ 30 + */ 29 31 #define VETH_MAC_ADDR "local-mac-address" 30 32 #define VETH_MCAST_FILTER_SIZE "ibm,mac-address-filters" 31 33 ··· 39 37 #define VIO_IRQ_DISABLE 0UL 40 38 #define VIO_IRQ_ENABLE 1UL 41 39 42 - struct vio_dev; 43 - struct vio_driver; 44 - struct vio_device_id; 45 40 struct iommu_table; 46 - 47 - int vio_register_driver(struct vio_driver *drv); 48 - void vio_unregister_driver(struct vio_driver *drv); 49 - 50 - #ifdef CONFIG_PPC_PSERIES 51 - struct vio_dev * __devinit vio_register_device_node( 52 - struct device_node *node_vdev); 53 - #endif 54 - void __devinit vio_unregister_device(struct vio_dev *dev); 55 - struct vio_dev *vio_find_node(struct device_node *vnode); 56 - 57 - const void * vio_get_attribute(struct vio_dev *vdev, void* which, int* length); 58 - int vio_get_irq(struct vio_dev *dev); 59 - int vio_enable_interrupts(struct vio_dev *dev); 60 - int vio_disable_interrupts(struct vio_dev *dev); 61 - extern struct vio_dev * __devinit vio_register_device_common( 62 - struct vio_dev *viodev, char *name, char *type, 63 - uint32_t unit_address, struct iommu_table *iommu_table); 64 - 65 - extern struct dma_mapping_ops vio_dma_ops; 66 - 67 - extern struct bus_type vio_bus_type; 68 - 69 - struct vio_device_id { 70 - char *type; 71 - char *compat; 72 - }; 73 - 74 - struct vio_driver { 75 - struct list_head node; 76 - char *name; 77 - const struct vio_device_id *id_table; /* NULL if wants all devices */ 78 - int (*probe) (struct vio_dev *dev, const struct vio_device_id *id); /* New device inserted */ 79 - int (*remove) (struct vio_dev *dev); /* Device removed (NULL if not a hot-plug capable driver) */ 80 - unsigned long driver_data; 81 - 82 - struct device_driver driver; 83 - }; 84 - 85 - static inline struct vio_driver *to_vio_driver(struct device_driver *drv) 86 - { 87 - return container_of(drv, struct vio_driver, driver); 88 - } 89 41 90 42 /* 91 43 * The vio_dev structure is used to describe virtual I/O devices. ··· 48 92 struct iommu_table *iommu_table; /* vio_map_* uses this */ 49 93 char *name; 50 94 char *type; 51 - uint32_t unit_address; 95 + uint32_t unit_address; 52 96 unsigned int irq; 53 - 54 97 struct device dev; 55 98 }; 56 99 100 + struct vio_driver { 101 + struct list_head node; 102 + char *name; 103 + const struct vio_device_id *id_table; 104 + int (*probe)(struct vio_dev *dev, const struct vio_device_id *id); 105 + int (*remove)(struct vio_dev *dev); 106 + unsigned long driver_data; 107 + struct device_driver driver; 108 + }; 109 + 110 + struct vio_bus_ops { 111 + int (*match)(const struct vio_device_id *id, const struct vio_dev *dev); 112 + void (*unregister_device)(struct vio_dev *); 113 + void (*release_device)(struct device *); 114 + }; 115 + 116 + extern struct dma_mapping_ops vio_dma_ops; 117 + extern struct bus_type vio_bus_type; 57 118 extern struct vio_dev vio_bus_device; 119 + 120 + extern int vio_register_driver(struct vio_driver *drv); 121 + extern void vio_unregister_driver(struct vio_driver *drv); 122 + 123 + extern struct vio_dev * __devinit vio_register_device(struct vio_dev *viodev); 124 + extern void __devinit vio_unregister_device(struct vio_dev *dev); 125 + 126 + extern int vio_bus_init(struct vio_bus_ops *); 127 + 128 + #ifdef CONFIG_PPC_PSERIES 129 + struct device_node; 130 + 131 + extern struct vio_dev * __devinit vio_register_device_node( 132 + struct device_node *node_vdev); 133 + extern struct vio_dev *vio_find_node(struct device_node *vnode); 134 + extern const void *vio_get_attribute(struct vio_dev *vdev, void *which, 135 + int *length); 136 + extern int vio_enable_interrupts(struct vio_dev *dev); 137 + extern int vio_disable_interrupts(struct vio_dev *dev); 138 + #endif 139 + 140 + static inline struct vio_driver *to_vio_driver(struct device_driver *drv) 141 + { 142 + return container_of(drv, struct vio_driver, driver); 143 + } 58 144 59 145 static inline struct vio_dev *to_vio_dev(struct device *dev) 60 146 { 61 147 return container_of(dev, struct vio_dev, dev); 62 148 } 63 - 64 - extern int vio_bus_init(int (*is_match)(const struct vio_device_id *id, 65 - const struct vio_dev *dev), 66 - void (*)(struct vio_dev *), 67 - void (*)(struct device *)); 68 149 69 150 #endif /* _ASM_VIO_H */
-1
include/asm-ppc64/xor.h
··· 1 - #include <asm-generic/xor.h>
+6 -1
include/linux/mod_devicetable.h
··· 1 1 /* 2 2 * Device tables which are exported to userspace via 3 - * scripts/table2alias.c. You must keep that file in sync with this 3 + * scripts/mod/file2alias.c. You must keep that file in sync with this 4 4 * header. 5 5 */ 6 6 ··· 190 190 #endif 191 191 }; 192 192 193 + /* VIO */ 194 + struct vio_device_id { 195 + char type[32]; 196 + char compat[32]; 197 + }; 193 198 194 199 /* PCMCIA */ 195 200
+19
scripts/mod/file2alias.c
··· 341 341 return 1; 342 342 } 343 343 344 + static int do_vio_entry(const char *filename, struct vio_device_id *vio, 345 + char *alias) 346 + { 347 + char *tmp; 348 + 349 + sprintf(alias, "vio:T%sS%s", vio->type[0] ? vio->type : "*", 350 + vio->compat[0] ? vio->compat : "*"); 351 + 352 + /* Replace all whitespace with underscores */ 353 + for (tmp = alias; tmp && *tmp; tmp++) 354 + if (isspace (*tmp)) 355 + *tmp = '_'; 356 + 357 + return 1; 358 + } 359 + 344 360 /* Ignore any prefix, eg. v850 prepends _ */ 345 361 static inline int sym_is(const char *symbol, const char *name) 346 362 { ··· 438 422 else if (sym_is(symname, "__mod_of_device_table")) 439 423 do_table(symval, sym->st_size, sizeof(struct of_device_id), 440 424 do_of_entry, mod); 425 + else if (sym_is(symname, "__mod_vio_device_table")) 426 + do_table(symval, sym->st_size, sizeof(struct vio_device_id), 427 + do_vio_entry, mod); 441 428 442 429 } 443 430