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

+206 -575
+10 -1
arch/ppc/Makefile
··· 21 endif 22 23 LDFLAGS_vmlinux := -Ttext $(KERNELLOAD) -Bstatic 24 - CPPFLAGS += -Iarch/$(ARCH) 25 AFLAGS += -Iarch/$(ARCH) 26 CFLAGS += -Iarch/$(ARCH) -msoft-float -pipe \ 27 -ffixed-r2 -mmultiple 28 CPP = $(CC) -E $(CFLAGS) 29 30 CHECKFLAGS += -D__powerpc__ 31 ··· 103 104 archclean: 105 $(Q)$(MAKE) $(clean)=arch/ppc/boot 106 107 prepare: include/asm-$(ARCH)/offsets.h checkbin 108 ··· 112 113 include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s 114 $(call filechk,gen-asm-offsets) 115 116 # Use the file '.tmp_gas_check' for binutils tests, as gas won't output 117 # to stdout and these checks are run even on install targets.
··· 21 endif 22 23 LDFLAGS_vmlinux := -Ttext $(KERNELLOAD) -Bstatic 24 + CPPFLAGS += -Iarch/$(ARCH) -Iinclude3 25 AFLAGS += -Iarch/$(ARCH) 26 CFLAGS += -Iarch/$(ARCH) -msoft-float -pipe \ 27 -ffixed-r2 -mmultiple 28 CPP = $(CC) -E $(CFLAGS) 29 + # Temporary hack until we have migrated to asm-powerpc 30 + LINUXINCLUDE += -Iinclude3 31 32 CHECKFLAGS += -D__powerpc__ 33 ··· 101 102 archclean: 103 $(Q)$(MAKE) $(clean)=arch/ppc/boot 104 + $(Q)rm -rf include3 105 106 prepare: include/asm-$(ARCH)/offsets.h checkbin 107 ··· 109 110 include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s 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 118 119 # Use the file '.tmp_gas_check' for binutils tests, as gas won't output 120 # to stdout and these checks are run even on install targets.
+9
arch/ppc64/Makefile
··· 55 LDFLAGS_vmlinux := -Bstatic -e $(KERNELLOAD) -Ttext $(KERNELLOAD) 56 CFLAGS += -msoft-float -pipe -mminimal-toc -mtraceback=none \ 57 -mcall-aixdesc 58 59 GCC_VERSION := $(call cc-version) 60 GCC_BROKEN_VEC := $(shell if [ $(GCC_VERSION) -lt 0400 ] ; then echo "y"; fi ;) ··· 114 115 archclean: 116 $(Q)$(MAKE) $(clean)=$(boot) 117 118 prepare: include/asm-ppc64/offsets.h 119 ··· 123 124 include/asm-ppc64/offsets.h: arch/ppc64/kernel/asm-offsets.s 125 $(call filechk,gen-asm-offsets) 126 127 define archhelp 128 echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
··· 55 LDFLAGS_vmlinux := -Bstatic -e $(KERNELLOAD) -Ttext $(KERNELLOAD) 56 CFLAGS += -msoft-float -pipe -mminimal-toc -mtraceback=none \ 57 -mcall-aixdesc 58 + # Temporary hack until we have migrated to asm-powerpc 59 + CPPFLAGS += -Iinclude3 60 61 GCC_VERSION := $(call cc-version) 62 GCC_BROKEN_VEC := $(shell if [ $(GCC_VERSION) -lt 0400 ] ; then echo "y"; fi ;) ··· 112 113 archclean: 114 $(Q)$(MAKE) $(clean)=$(boot) 115 + $(Q)rm -rf include3 116 117 prepare: include/asm-ppc64/offsets.h 118 ··· 120 121 include/asm-ppc64/offsets.h: arch/ppc64/kernel/asm-offsets.s 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 129 130 define archhelp 131 echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
+3 -3
arch/ppc64/configs/g5_defconfig
··· 103 # CONFIG_PREEMPT_VOLUNTARY is not set 104 # CONFIG_PREEMPT is not set 105 # CONFIG_PREEMPT_BKL is not set 106 - CONFIG_HZ_100=y 107 - # CONFIG_HZ_250 is not set 108 # CONFIG_HZ_1000 is not set 109 - CONFIG_HZ=100 110 CONFIG_GENERIC_HARDIRQS=y 111 CONFIG_SECCOMP=y 112 CONFIG_ISA_DMA_API=y
··· 103 # CONFIG_PREEMPT_VOLUNTARY is not set 104 # CONFIG_PREEMPT is not set 105 # CONFIG_PREEMPT_BKL is not set 106 + # CONFIG_HZ_100 is not set 107 + CONFIG_HZ_250=y 108 # CONFIG_HZ_1000 is not set 109 + CONFIG_HZ=250 110 CONFIG_GENERIC_HARDIRQS=y 111 CONFIG_SECCOMP=y 112 CONFIG_ISA_DMA_API=y
+3 -3
arch/ppc64/configs/iSeries_defconfig
··· 94 # CONFIG_PREEMPT_VOLUNTARY is not set 95 # CONFIG_PREEMPT is not set 96 # CONFIG_PREEMPT_BKL is not set 97 - CONFIG_HZ_100=y 98 - # CONFIG_HZ_250 is not set 99 # CONFIG_HZ_1000 is not set 100 - CONFIG_HZ=100 101 CONFIG_GENERIC_HARDIRQS=y 102 CONFIG_LPARCFG=y 103 CONFIG_SECCOMP=y
··· 94 # CONFIG_PREEMPT_VOLUNTARY is not set 95 # CONFIG_PREEMPT is not set 96 # CONFIG_PREEMPT_BKL is not set 97 + # CONFIG_HZ_100 is not set 98 + CONFIG_HZ_250=y 99 # CONFIG_HZ_1000 is not set 100 + CONFIG_HZ=250 101 CONFIG_GENERIC_HARDIRQS=y 102 CONFIG_LPARCFG=y 103 CONFIG_SECCOMP=y
+3 -3
arch/ppc64/configs/maple_defconfig
··· 103 # CONFIG_PREEMPT_VOLUNTARY is not set 104 # CONFIG_PREEMPT is not set 105 # CONFIG_PREEMPT_BKL is not set 106 - CONFIG_HZ_100=y 107 - # CONFIG_HZ_250 is not set 108 # CONFIG_HZ_1000 is not set 109 - CONFIG_HZ=100 110 CONFIG_GENERIC_HARDIRQS=y 111 CONFIG_SECCOMP=y 112 CONFIG_ISA_DMA_API=y
··· 103 # CONFIG_PREEMPT_VOLUNTARY is not set 104 # CONFIG_PREEMPT is not set 105 # CONFIG_PREEMPT_BKL is not set 106 + # CONFIG_HZ_100 is not set 107 + CONFIG_HZ_250=y 108 # CONFIG_HZ_1000 is not set 109 + CONFIG_HZ=250 110 CONFIG_GENERIC_HARDIRQS=y 111 CONFIG_SECCOMP=y 112 CONFIG_ISA_DMA_API=y
+3 -3
arch/ppc64/configs/pSeries_defconfig
··· 112 # CONFIG_PREEMPT_VOLUNTARY is not set 113 # CONFIG_PREEMPT is not set 114 # CONFIG_PREEMPT_BKL is not set 115 - CONFIG_HZ_100=y 116 - # CONFIG_HZ_250 is not set 117 # CONFIG_HZ_1000 is not set 118 - CONFIG_HZ=100 119 CONFIG_EEH=y 120 CONFIG_GENERIC_HARDIRQS=y 121 CONFIG_PPC_RTAS=y
··· 112 # CONFIG_PREEMPT_VOLUNTARY is not set 113 # CONFIG_PREEMPT is not set 114 # CONFIG_PREEMPT_BKL is not set 115 + # CONFIG_HZ_100 is not set 116 + CONFIG_HZ_250=y 117 # CONFIG_HZ_1000 is not set 118 + CONFIG_HZ=250 119 CONFIG_EEH=y 120 CONFIG_GENERIC_HARDIRQS=y 121 CONFIG_PPC_RTAS=y
+3 -3
arch/ppc64/defconfig
··· 114 # CONFIG_PREEMPT_VOLUNTARY is not set 115 # CONFIG_PREEMPT is not set 116 # CONFIG_PREEMPT_BKL is not set 117 - CONFIG_HZ_100=y 118 - # CONFIG_HZ_250 is not set 119 # CONFIG_HZ_1000 is not set 120 - CONFIG_HZ=100 121 CONFIG_EEH=y 122 CONFIG_GENERIC_HARDIRQS=y 123 CONFIG_PPC_RTAS=y
··· 114 # CONFIG_PREEMPT_VOLUNTARY is not set 115 # CONFIG_PREEMPT is not set 116 # CONFIG_PREEMPT_BKL is not set 117 + # CONFIG_HZ_100 is not set 118 + CONFIG_HZ_250=y 119 # CONFIG_HZ_1000 is not set 120 + CONFIG_HZ=250 121 CONFIG_EEH=y 122 CONFIG_GENERIC_HARDIRQS=y 123 CONFIG_PPC_RTAS=y
+15 -1
arch/ppc64/kernel/head.S
··· 1269 .= 0x7000 1270 .globl fwnmi_data_area 1271 fwnmi_data_area: 1272 - .space PAGE_SIZE 1273 1274 /* 1275 * On pSeries, secondary processors spin in the following code.
··· 1269 .= 0x7000 1270 .globl fwnmi_data_area 1271 fwnmi_data_area: 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 1287 1288 /* 1289 * On pSeries, secondary processors spin in the following code.
+16 -5
arch/ppc64/kernel/iSeries_vio.c
··· 68 } 69 70 /** 71 - * vio_register_device: - Register a new vio device. 72 * @voidev: The device to register. 73 */ 74 static struct vio_dev *__init vio_register_device_iseries(char *type, ··· 76 { 77 struct vio_dev *viodev; 78 79 - /* allocate a vio_dev for this node */ 80 viodev = kmalloc(sizeof(struct vio_dev), GFP_KERNEL); 81 if (!viodev) 82 return NULL; ··· 84 85 snprintf(viodev->dev.bus_id, BUS_ID_SIZE, "%s%d", type, unit_num); 86 87 - return vio_register_device_common(viodev, viodev->dev.bus_id, type, 88 - unit_num, &vio_iommu_table); 89 } 90 91 void __init probe_bus_iseries(void) ··· 131 return strncmp(dev->type, id->type, strlen(id->type)) == 0; 132 } 133 134 /** 135 * vio_bus_init_iseries: - Initialize the iSeries virtual IO bus 136 */ ··· 142 { 143 int err; 144 145 - err = vio_bus_init(vio_match_device_iseries, NULL, NULL); 146 if (err == 0) { 147 iommu_vio_init(); 148 vio_bus_device.iommu_table = &vio_iommu_table;
··· 68 } 69 70 /** 71 + * vio_register_device_iseries: - Register a new iSeries vio device. 72 * @voidev: The device to register. 73 */ 74 static struct vio_dev *__init vio_register_device_iseries(char *type, ··· 76 { 77 struct vio_dev *viodev; 78 79 + /* allocate a vio_dev for this device */ 80 viodev = kmalloc(sizeof(struct vio_dev), GFP_KERNEL); 81 if (!viodev) 82 return NULL; ··· 84 85 snprintf(viodev->dev.bus_id, BUS_ID_SIZE, "%s%d", type, unit_num); 86 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; 96 } 97 98 void __init probe_bus_iseries(void) ··· 124 return strncmp(dev->type, id->type, strlen(id->type)) == 0; 125 } 126 127 + static struct vio_bus_ops vio_bus_ops_iseries = { 128 + .match = vio_match_device_iseries, 129 + }; 130 + 131 /** 132 * vio_bus_init_iseries: - Initialize the iSeries virtual IO bus 133 */ ··· 131 { 132 int err; 133 134 + err = vio_bus_init(&vio_bus_ops_iseries); 135 if (err == 0) { 136 iommu_vio_init(); 137 vio_bus_device.iommu_table = &vio_iommu_table;
+1
arch/ppc64/kernel/lparcfg.c
··· 273 if (!workbuffer) { 274 printk(KERN_ERR "%s %s kmalloc failure at line %d \n", 275 __FILE__, __FUNCTION__, __LINE__); 276 return; 277 } 278 #ifdef LPARCFG_DEBUG
··· 273 if (!workbuffer) { 274 printk(KERN_ERR "%s %s kmalloc failure at line %d \n", 275 __FILE__, __FUNCTION__, __LINE__); 276 + kfree(local_buffer); 277 return; 278 } 279 #ifdef LPARCFG_DEBUG
-2
arch/ppc64/kernel/of_device.c
··· 236 struct of_device* of_platform_device_create(struct device_node *np, const char *bus_id) 237 { 238 struct of_device *dev; 239 - u32 *reg; 240 241 dev = kmalloc(sizeof(*dev), GFP_KERNEL); 242 if (!dev) ··· 249 dev->dev.bus = &of_platform_bus_type; 250 dev->dev.release = of_release_dev; 251 252 - reg = (u32 *)get_property(np, "reg", NULL); 253 strlcpy(dev->dev.bus_id, bus_id, BUS_ID_SIZE); 254 255 if (of_device_register(dev) != 0) {
··· 236 struct of_device* of_platform_device_create(struct device_node *np, const char *bus_id) 237 { 238 struct of_device *dev; 239 240 dev = kmalloc(sizeof(*dev), GFP_KERNEL); 241 if (!dev) ··· 250 dev->dev.bus = &of_platform_bus_type; 251 dev->dev.release = of_release_dev; 252 253 strlcpy(dev->dev.bus_id, bus_id, BUS_ID_SIZE); 254 255 if (of_device_register(dev) != 0) {
+13 -6
arch/ppc64/kernel/pSeries_vio.c
··· 19 #include <linux/kobject.h> 20 #include <asm/iommu.h> 21 #include <asm/dma.h> 22 #include <asm/vio.h> 23 #include <asm/hvcall.h> 24 ··· 76 device_remove_file(&viodev->dev, &dev_attr_devspec); 77 } 78 79 /** 80 * vio_bus_init_pseries: - Initialize the pSeries virtual IO bus 81 */ ··· 89 { 90 int err; 91 92 - err = vio_bus_init(vio_match_device_pseries, 93 - vio_unregister_device_pseries, 94 - vio_release_device_pseries); 95 if (err == 0) 96 probe_bus_pseries(); 97 return err; ··· 186 } 187 188 snprintf(viodev->dev.bus_id, BUS_ID_SIZE, "%x", *unit_address); 189 190 /* 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) { 194 /* XXX free TCE table */ 195 kfree(viodev); 196 return NULL;
··· 19 #include <linux/kobject.h> 20 #include <asm/iommu.h> 21 #include <asm/dma.h> 22 + #include <asm/prom.h> 23 #include <asm/vio.h> 24 #include <asm/hvcall.h> 25 ··· 75 device_remove_file(&viodev->dev, &dev_attr_devspec); 76 } 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 + 84 /** 85 * vio_bus_init_pseries: - Initialize the pSeries virtual IO bus 86 */ ··· 82 { 83 int err; 84 85 + err = vio_bus_init(&vio_bus_ops_pseries); 86 if (err == 0) 87 probe_bus_pseries(); 88 return err; ··· 181 } 182 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); 188 189 /* register with generic device framework */ 190 + if (vio_register_device(viodev) == NULL) { 191 /* XXX free TCE table */ 192 kfree(viodev); 193 return NULL;
+4 -1
arch/ppc64/kernel/prom_init.c
··· 892 if ( RELOC(of_platform) == PLATFORM_PSERIES_LPAR ) 893 RELOC(alloc_top) = RELOC(rmo_top); 894 else 895 - RELOC(alloc_top) = RELOC(rmo_top) = min(0x40000000ul, RELOC(ram_top)); 896 897 prom_printf("memory layout at init:\n"); 898 prom_printf(" memory_limit : %x (16 MB aligned)\n", RELOC(prom_memory_limit));
··· 892 if ( RELOC(of_platform) == PLATFORM_PSERIES_LPAR ) 893 RELOC(alloc_top) = RELOC(rmo_top); 894 else 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)); 899 900 prom_printf("memory layout at init:\n"); 901 prom_printf(" memory_limit : %x (16 MB aligned)\n", RELOC(prom_memory_limit));
+27 -46
arch/ppc64/kernel/vio.c
··· 32 .dev.bus = &vio_bus_type, 33 }; 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); 39 40 - /* convert from struct device to struct vio_dev and pass to driver. 41 * dev->driver has already been set by generic code because vio_bus_match 42 - * succeeded. */ 43 static int vio_bus_probe(struct device *dev) 44 { 45 struct vio_dev *viodev = to_vio_dev(dev); ··· 50 return error; 51 52 id = vio_match_device(viodrv->id_table, viodev); 53 - if (id) { 54 error = viodrv->probe(viodev, id); 55 - } 56 57 return error; 58 } ··· 62 struct vio_dev *viodev = to_vio_dev(dev); 63 struct vio_driver *viodrv = to_vio_driver(dev->driver); 64 65 - if (viodrv->remove) { 66 return viodrv->remove(viodev); 67 - } 68 69 /* driver can't remove */ 70 return 1; ··· 99 EXPORT_SYMBOL(vio_unregister_driver); 100 101 /** 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 * 106 * Used by a driver to check whether a VIO device present in the 107 * system is in its list of supported devices. Returns the matching 108 * vio_device_id structure or NULL if there is no match. 109 */ 110 - static const struct vio_device_id * vio_match_device(const struct vio_device_id *ids, 111 - const struct vio_dev *dev) 112 { 113 - while (ids->type) { 114 - if (is_match(ids, dev)) 115 return ids; 116 ids++; 117 } ··· 122 /** 123 * vio_bus_init: - Initialize the virtual IO bus 124 */ 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 *)) 129 { 130 int err; 131 132 - is_match = match_func; 133 - unregister_device_callback = unregister_dev; 134 - release_device_callback = release_dev; 135 136 err = bus_register(&vio_bus_type); 137 if (err) { ··· 134 return err; 135 } 136 137 - /* the fake parent of all vio devices, just to give us 138 * a nice directory 139 */ 140 err = device_register(&vio_bus_device.dev); ··· 151 /* vio_dev refcount hit 0 */ 152 static void __devinit vio_dev_release(struct device *dev) 153 { 154 - if (release_device_callback) 155 - release_device_callback(dev); 156 kfree(to_vio_dev(dev)); 157 } 158 159 - static ssize_t viodev_show_name(struct device *dev, struct device_attribute *attr, char *buf) 160 { 161 return sprintf(buf, "%s\n", to_vio_dev(dev)->name); 162 } 163 DEVICE_ATTR(name, S_IRUSR | S_IRGRP | S_IROTH, viodev_show_name, NULL); 164 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) 168 { 169 - viodev->name = name; 170 - viodev->type = type; 171 - viodev->unit_address = unit_address; 172 - viodev->iommu_table = iommu_table; 173 /* init generic 'struct device' fields: */ 174 viodev->dev.parent = &vio_bus_device.dev; 175 viodev->dev.bus = &vio_bus_type; ··· 183 184 void __devinit vio_unregister_device(struct vio_dev *viodev) 185 { 186 - if (unregister_device_callback) 187 - unregister_device_callback(viodev); 188 device_remove_file(&viodev->dev, &dev_attr_name); 189 device_unregister(&viodev->dev); 190 } ··· 251 const struct vio_dev *vio_dev = to_vio_dev(dev); 252 struct vio_driver *vio_drv = to_vio_driver(drv); 253 const struct vio_device_id *ids = vio_drv->id_table; 254 - const struct vio_device_id *found_id; 255 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; 264 } 265 266 struct bus_type vio_bus_type = {
··· 32 .dev.bus = &vio_bus_type, 33 }; 34 35 + static struct vio_bus_ops vio_bus_ops; 36 37 + /* 38 + * Convert from struct device to struct vio_dev and pass to driver. 39 * dev->driver has already been set by generic code because vio_bus_match 40 + * succeeded. 41 + */ 42 static int vio_bus_probe(struct device *dev) 43 { 44 struct vio_dev *viodev = to_vio_dev(dev); ··· 51 return error; 52 53 id = vio_match_device(viodrv->id_table, viodev); 54 + if (id) 55 error = viodrv->probe(viodev, id); 56 57 return error; 58 } ··· 64 struct vio_dev *viodev = to_vio_dev(dev); 65 struct vio_driver *viodrv = to_vio_driver(dev->driver); 66 67 + if (viodrv->remove) 68 return viodrv->remove(viodev); 69 70 /* driver can't remove */ 71 return 1; ··· 102 EXPORT_SYMBOL(vio_unregister_driver); 103 104 /** 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 109 * 110 * Used by a driver to check whether a VIO device present in the 111 * system is in its list of supported devices. Returns the matching 112 * vio_device_id structure or NULL if there is no match. 113 */ 114 + static const struct vio_device_id *vio_match_device( 115 + const struct vio_device_id *ids, const struct vio_dev *dev) 116 { 117 + while (ids->type[0] != '\0') { 118 + if (vio_bus_ops.match(ids, dev)) 119 return ids; 120 ids++; 121 } ··· 124 /** 125 * vio_bus_init: - Initialize the virtual IO bus 126 */ 127 + int __init vio_bus_init(struct vio_bus_ops *ops) 128 { 129 int err; 130 131 + vio_bus_ops = *ops; 132 133 err = bus_register(&vio_bus_type); 134 if (err) { ··· 141 return err; 142 } 143 144 + /* 145 + * The fake parent of all vio devices, just to give us 146 * a nice directory 147 */ 148 err = device_register(&vio_bus_device.dev); ··· 157 /* vio_dev refcount hit 0 */ 158 static void __devinit vio_dev_release(struct device *dev) 159 { 160 + if (vio_bus_ops.release_device) 161 + vio_bus_ops.release_device(dev); 162 kfree(to_vio_dev(dev)); 163 } 164 165 + static ssize_t viodev_show_name(struct device *dev, 166 + struct device_attribute *attr, char *buf) 167 { 168 return sprintf(buf, "%s\n", to_vio_dev(dev)->name); 169 } 170 DEVICE_ATTR(name, S_IRUSR | S_IRGRP | S_IROTH, viodev_show_name, NULL); 171 172 + struct vio_dev * __devinit vio_register_device(struct vio_dev *viodev) 173 { 174 /* init generic 'struct device' fields: */ 175 viodev->dev.parent = &vio_bus_device.dev; 176 viodev->dev.bus = &vio_bus_type; ··· 194 195 void __devinit vio_unregister_device(struct vio_dev *viodev) 196 { 197 + if (vio_bus_ops.unregister_device) 198 + vio_bus_ops.unregister_device(viodev); 199 device_remove_file(&viodev->dev, &dev_attr_name); 200 device_unregister(&viodev->dev); 201 } ··· 262 const struct vio_dev *vio_dev = to_vio_dev(dev); 263 struct vio_driver *vio_drv = to_vio_driver(drv); 264 const struct vio_device_id *ids = vio_drv->id_table; 265 266 + return (ids != NULL) && (vio_match_device(ids, vio_dev) != NULL); 267 } 268 269 struct bus_type vio_bus_type = {
+1 -3
arch/ppc64/mm/hash_low.S
··· 129 * code rather than call a C function...) 130 */ 131 BEGIN_FTR_SECTION 132 - BEGIN_FTR_SECTION 133 mr r4,r30 134 mr r5,r7 135 bl .hash_page_do_lazy_icache 136 - END_FTR_SECTION_IFSET(CPU_FTR_NOEXECUTE) 137 - END_FTR_SECTION_IFCLR(CPU_FTR_COHERENT_ICACHE) 138 139 /* At this point, r3 contains new PP bits, save them in 140 * place of "access" in the param area (sic)
··· 129 * code rather than call a C function...) 130 */ 131 BEGIN_FTR_SECTION 132 mr r4,r30 133 mr r5,r7 134 bl .hash_page_do_lazy_icache 135 + END_FTR_SECTION(CPU_FTR_NOEXECUTE|CPU_FTR_COHERENT_ICACHE, CPU_FTR_NOEXECUTE) 136 137 /* At this point, r3 contains new PP bits, save them in 138 * place of "access" in the param area (sic)
+1
arch/ppc64/oprofile/common.c
··· 153 154 case PV_970: 155 case PV_970FX: 156 model = &op_model_power4; 157 model->num_counters = 8; 158 ops->cpu_type = "ppc64/970";
··· 153 154 case PV_970: 155 case PV_970FX: 156 + case PV_970MP: 157 model = &op_model_power4; 158 model->num_counters = 8; 159 ops->cpu_type = "ppc64/970";
+1 -1
drivers/block/viodasd.c
··· 776 */ 777 static struct vio_device_id viodasd_device_table[] __devinitdata = { 778 { "viodasd", "" }, 779 - { 0, } 780 }; 781 782 MODULE_DEVICE_TABLE(vio, viodasd_device_table);
··· 776 */ 777 static struct vio_device_id viodasd_device_table[] __devinitdata = { 778 { "viodasd", "" }, 779 + { "", "" } 780 }; 781 782 MODULE_DEVICE_TABLE(vio, viodasd_device_table);
+1 -1
drivers/cdrom/viocd.c
··· 734 */ 735 static struct vio_device_id viocd_device_table[] __devinitdata = { 736 { "viocd", "" }, 737 - { 0, } 738 }; 739 740 MODULE_DEVICE_TABLE(vio, viocd_device_table);
··· 734 */ 735 static struct vio_device_id viocd_device_table[] __devinitdata = { 736 { "viocd", "" }, 737 + { "", "" } 738 }; 739 740 MODULE_DEVICE_TABLE(vio, viocd_device_table);
+1 -1
drivers/char/hvc_vio.c
··· 39 40 static struct vio_device_id hvc_driver_table[] __devinitdata = { 41 {"serial", "hvterm1"}, 42 - { NULL, } 43 }; 44 MODULE_DEVICE_TABLE(vio, hvc_driver_table); 45
··· 39 40 static struct vio_device_id hvc_driver_table[] __devinitdata = { 41 {"serial", "hvterm1"}, 42 + { "", "" } 43 }; 44 MODULE_DEVICE_TABLE(vio, hvc_driver_table); 45
+1 -1
drivers/char/hvcs.c
··· 527 528 static struct vio_device_id hvcs_driver_table[] __devinitdata= { 529 {"serial-server", "hvterm2"}, 530 - { NULL, } 531 }; 532 MODULE_DEVICE_TABLE(vio, hvcs_driver_table); 533
··· 527 528 static struct vio_device_id hvcs_driver_table[] __devinitdata= { 529 {"serial-server", "hvterm2"}, 530 + { "", "" } 531 }; 532 MODULE_DEVICE_TABLE(vio, hvcs_driver_table); 533
+1 -1
drivers/char/viotape.c
··· 991 */ 992 static struct vio_device_id viotape_device_table[] __devinitdata = { 993 { "viotape", "" }, 994 - { 0, } 995 }; 996 997 MODULE_DEVICE_TABLE(vio, viotape_device_table);
··· 991 */ 992 static struct vio_device_id viotape_device_table[] __devinitdata = { 993 { "viotape", "" }, 994 + { "", "" } 995 }; 996 997 MODULE_DEVICE_TABLE(vio, viotape_device_table);
+1 -1
drivers/net/ibmveth.c
··· 1144 1145 static struct vio_device_id ibmveth_device_table[] __devinitdata= { 1146 { "network", "IBM,l-lan"}, 1147 - { 0,} 1148 }; 1149 1150 MODULE_DEVICE_TABLE(vio, ibmveth_device_table);
··· 1144 1145 static struct vio_device_id ibmveth_device_table[] __devinitdata= { 1146 { "network", "IBM,l-lan"}, 1147 + { "", "" } 1148 }; 1149 1150 MODULE_DEVICE_TABLE(vio, ibmveth_device_table);
+1 -1
drivers/net/iseries_veth.c
··· 1370 */ 1371 static struct vio_device_id veth_device_table[] __devinitdata = { 1372 { "vlan", "" }, 1373 - { NULL, NULL } 1374 }; 1375 MODULE_DEVICE_TABLE(vio, veth_device_table); 1376
··· 1370 */ 1371 static struct vio_device_id veth_device_table[] __devinitdata = { 1372 { "vlan", "" }, 1373 + { "", "" } 1374 }; 1375 MODULE_DEVICE_TABLE(vio, veth_device_table); 1376
+1 -1
drivers/scsi/ibmvscsi/ibmvscsi.c
··· 1442 */ 1443 static struct vio_device_id ibmvscsi_device_table[] __devinitdata = { 1444 {"vscsi", "IBM,v-scsi"}, 1445 - {0,} 1446 }; 1447 1448 MODULE_DEVICE_TABLE(vio, ibmvscsi_device_table);
··· 1442 */ 1443 static struct vio_device_id ibmvscsi_device_table[] __devinitdata = { 1444 {"vscsi", "IBM,v-scsi"}, 1445 + { "", "" } 1446 }; 1447 1448 MODULE_DEVICE_TABLE(vio, ibmvscsi_device_table);
+1
drivers/scsi/ibmvscsi/rpa_vscsi.c
··· 28 */ 29 30 #include <asm/vio.h> 31 #include <asm/iommu.h> 32 #include <asm/hvcall.h> 33 #include <linux/dma-mapping.h>
··· 28 */ 29 30 #include <asm/vio.h> 31 + #include <asm/prom.h> 32 #include <asm/iommu.h> 33 #include <asm/hvcall.h> 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 #ifndef _8253PIT_H 6 #define _8253PIT_H 7 8 - #define PIT_TICK_RATE 1193182UL 9 10 #endif
··· 5 #ifndef _8253PIT_H 6 #define _8253PIT_H 7 8 + #define PIT_TICK_RATE 1193182UL 9 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 #ifndef _ASM_PPC64_PARAM_H 2 #define _ASM_PPC64_PARAM_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 ··· 11 */ 12 13 #ifdef __KERNEL__ 14 - # define HZ 1000 /* Internal kernel timer frequency */ 15 # define USER_HZ 100 /* .. some user interfaces are in "ticks" */ 16 # define CLOCKS_PER_SEC (USER_HZ) /* like times() */ 17 #endif
··· 1 #ifndef _ASM_PPC64_PARAM_H 2 #define _ASM_PPC64_PARAM_H 3 4 + #include <linux/config.h> 5 + 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 */ 10 11 #ifdef __KERNEL__ 12 + # define HZ CONFIG_HZ /* Internal kernel timer frequency */ 13 # define USER_HZ 100 /* .. some user interfaces are in "ticks" */ 14 # define CLOCKS_PER_SEC (USER_HZ) /* like times() */ 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 490 extern void paging_init(void); 491 492 #define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) \ 493 free_pgd_range(tlb, addr, end, floor, ceiling) 494 495 /* 496 * This gets called at the end of handling a page fault, when
··· 489 490 extern void paging_init(void); 491 492 + #ifdef CONFIG_HUGETLB_PAGE 493 #define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) \ 494 free_pgd_range(tlb, addr, end, floor, ceiling) 495 + #endif 496 497 /* 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 #define PV_970FX 0x003C 269 #define PV_630 0x0040 270 #define PV_630p 0x0041 271 #define PV_BE 0x0070 272 273 /* Platforms supported by PPC64 */
··· 268 #define PV_970FX 0x003C 269 #define PV_630 0x0040 270 #define PV_630p 0x0041 271 + #define PV_970MP 0x0044 272 #define PV_BE 0x0070 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 #include <linux/errno.h> 20 #include <linux/device.h> 21 #include <linux/dma-mapping.h> 22 #include <asm/hvcall.h> 23 - #include <asm/prom.h> 24 #include <asm/scatterlist.h> 25 - /* 26 * Architecture-specific constants for drivers to 27 * extract attributes of the device using vio_get_attribute() 28 - */ 29 #define VETH_MAC_ADDR "local-mac-address" 30 #define VETH_MCAST_FILTER_SIZE "ibm,mac-address-filters" 31 ··· 39 #define VIO_IRQ_DISABLE 0UL 40 #define VIO_IRQ_ENABLE 1UL 41 42 - struct vio_dev; 43 - struct vio_driver; 44 - struct vio_device_id; 45 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 90 /* 91 * The vio_dev structure is used to describe virtual I/O devices. ··· 48 struct iommu_table *iommu_table; /* vio_map_* uses this */ 49 char *name; 50 char *type; 51 - uint32_t unit_address; 52 unsigned int irq; 53 - 54 struct device dev; 55 }; 56 57 extern struct vio_dev vio_bus_device; 58 59 static inline struct vio_dev *to_vio_dev(struct device *dev) 60 { 61 return container_of(dev, struct vio_dev, dev); 62 } 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 69 #endif /* _ASM_VIO_H */
··· 19 #include <linux/errno.h> 20 #include <linux/device.h> 21 #include <linux/dma-mapping.h> 22 + #include <linux/mod_devicetable.h> 23 + 24 #include <asm/hvcall.h> 25 #include <asm/scatterlist.h> 26 + 27 + /* 28 * Architecture-specific constants for drivers to 29 * extract attributes of the device using vio_get_attribute() 30 + */ 31 #define VETH_MAC_ADDR "local-mac-address" 32 #define VETH_MCAST_FILTER_SIZE "ibm,mac-address-filters" 33 ··· 37 #define VIO_IRQ_DISABLE 0UL 38 #define VIO_IRQ_ENABLE 1UL 39 40 struct iommu_table; 41 42 /* 43 * The vio_dev structure is used to describe virtual I/O devices. ··· 92 struct iommu_table *iommu_table; /* vio_map_* uses this */ 93 char *name; 94 char *type; 95 + uint32_t unit_address; 96 unsigned int irq; 97 struct device dev; 98 }; 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; 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 + } 144 145 static inline struct vio_dev *to_vio_dev(struct device *dev) 146 { 147 return container_of(dev, struct vio_dev, dev); 148 } 149 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 /* 2 * Device tables which are exported to userspace via 3 - * scripts/table2alias.c. You must keep that file in sync with this 4 * header. 5 */ 6 ··· 190 #endif 191 }; 192 193 194 /* PCMCIA */ 195
··· 1 /* 2 * Device tables which are exported to userspace via 3 + * scripts/mod/file2alias.c. You must keep that file in sync with this 4 * header. 5 */ 6 ··· 190 #endif 191 }; 192 193 + /* VIO */ 194 + struct vio_device_id { 195 + char type[32]; 196 + char compat[32]; 197 + }; 198 199 /* PCMCIA */ 200
+19
scripts/mod/file2alias.c
··· 341 return 1; 342 } 343 344 /* Ignore any prefix, eg. v850 prepends _ */ 345 static inline int sym_is(const char *symbol, const char *name) 346 { ··· 438 else if (sym_is(symname, "__mod_of_device_table")) 439 do_table(symval, sym->st_size, sizeof(struct of_device_id), 440 do_of_entry, mod); 441 442 } 443
··· 341 return 1; 342 } 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 + 360 /* Ignore any prefix, eg. v850 prepends _ */ 361 static inline int sym_is(const char *symbol, const char *name) 362 { ··· 422 else if (sym_is(symname, "__mod_of_device_table")) 423 do_table(symval, sym->st_size, sizeof(struct of_device_id), 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); 428 429 } 430