···21endif2223LDFLAGS_vmlinux := -Ttext $(KERNELLOAD) -Bstatic24-CPPFLAGS += -Iarch/$(ARCH)25AFLAGS += -Iarch/$(ARCH)26CFLAGS += -Iarch/$(ARCH) -msoft-float -pipe \27 -ffixed-r2 -mmultiple28CPP = $(CC) -E $(CFLAGS)002930CHECKFLAGS += -D__powerpc__31···103104archclean:105 $(Q)$(MAKE) $(clean)=arch/ppc/boot0106107prepare: include/asm-$(ARCH)/offsets.h checkbin108···112113include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s114 $(call filechk,gen-asm-offsets)000000115116# Use the file '.tmp_gas_check' for binutils tests, as gas won't output117# to stdout and these checks are run even on install targets.
···21endif2223LDFLAGS_vmlinux := -Ttext $(KERNELLOAD) -Bstatic24+CPPFLAGS += -Iarch/$(ARCH) -Iinclude325AFLAGS += -Iarch/$(ARCH)26CFLAGS += -Iarch/$(ARCH) -msoft-float -pipe \27 -ffixed-r2 -mmultiple28CPP = $(CC) -E $(CFLAGS)29+# Temporary hack until we have migrated to asm-powerpc30+LINUXINCLUDE += -Iinclude33132CHECKFLAGS += -D__powerpc__33···101102archclean:103 $(Q)$(MAKE) $(clean)=arch/ppc/boot104+ $(Q)rm -rf include3105106prepare: include/asm-$(ARCH)/offsets.h checkbin107···109110include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s111 $(call filechk,gen-asm-offsets)112+113+# Temporary hack until we have migrated to asm-powerpc114+include/asm: include3/asm115+include3/asm:116+ $(Q)if [ ! -d include3 ]; then mkdir -p include3; fi117+ $(Q)ln -fsn $(srctree)/include/asm-powerpc include3/asm118119# Use the file '.tmp_gas_check' for binutils tests, as gas won't output120# to stdout and these checks are run even on install targets.
···55LDFLAGS_vmlinux := -Bstatic -e $(KERNELLOAD) -Ttext $(KERNELLOAD)56CFLAGS += -msoft-float -pipe -mminimal-toc -mtraceback=none \57 -mcall-aixdesc58+# Temporary hack until we have migrated to asm-powerpc59+CPPFLAGS += -Iinclude36061GCC_VERSION := $(call cc-version)62GCC_BROKEN_VEC := $(shell if [ $(GCC_VERSION) -lt 0400 ] ; then echo "y"; fi ;)···112113archclean:114 $(Q)$(MAKE) $(clean)=$(boot)115+ $(Q)rm -rf include3116117prepare: include/asm-ppc64/offsets.h118···120121include/asm-ppc64/offsets.h: arch/ppc64/kernel/asm-offsets.s122 $(call filechk,gen-asm-offsets)123+124+# Temporary hack until we have migrated to asm-powerpc125+include/asm: include3/asm126+include3/asm:127+ $(Q)if [ ! -d include3 ]; then mkdir -p include3; fi;128+ $(Q)ln -fsn $(srctree)/include/asm-powerpc include3/asm129130define archhelp131 echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
+3-3
arch/ppc64/configs/g5_defconfig
···103# CONFIG_PREEMPT_VOLUNTARY is not set104# CONFIG_PREEMPT is not set105# CONFIG_PREEMPT_BKL is not set106-CONFIG_HZ_100=y107-# CONFIG_HZ_250 is not set108# CONFIG_HZ_1000 is not set109-CONFIG_HZ=100110CONFIG_GENERIC_HARDIRQS=y111CONFIG_SECCOMP=y112CONFIG_ISA_DMA_API=y
···103# CONFIG_PREEMPT_VOLUNTARY is not set104# CONFIG_PREEMPT is not set105# CONFIG_PREEMPT_BKL is not set106+# CONFIG_HZ_100 is not set107+CONFIG_HZ_250=y108# CONFIG_HZ_1000 is not set109+CONFIG_HZ=250110CONFIG_GENERIC_HARDIRQS=y111CONFIG_SECCOMP=y112CONFIG_ISA_DMA_API=y
+3-3
arch/ppc64/configs/iSeries_defconfig
···94# CONFIG_PREEMPT_VOLUNTARY is not set95# CONFIG_PREEMPT is not set96# CONFIG_PREEMPT_BKL is not set97-CONFIG_HZ_100=y98-# CONFIG_HZ_250 is not set99# CONFIG_HZ_1000 is not set100-CONFIG_HZ=100101CONFIG_GENERIC_HARDIRQS=y102CONFIG_LPARCFG=y103CONFIG_SECCOMP=y
···94# CONFIG_PREEMPT_VOLUNTARY is not set95# CONFIG_PREEMPT is not set96# CONFIG_PREEMPT_BKL is not set97+# CONFIG_HZ_100 is not set98+CONFIG_HZ_250=y99# CONFIG_HZ_1000 is not set100+CONFIG_HZ=250101CONFIG_GENERIC_HARDIRQS=y102CONFIG_LPARCFG=y103CONFIG_SECCOMP=y
+3-3
arch/ppc64/configs/maple_defconfig
···103# CONFIG_PREEMPT_VOLUNTARY is not set104# CONFIG_PREEMPT is not set105# CONFIG_PREEMPT_BKL is not set106-CONFIG_HZ_100=y107-# CONFIG_HZ_250 is not set108# CONFIG_HZ_1000 is not set109-CONFIG_HZ=100110CONFIG_GENERIC_HARDIRQS=y111CONFIG_SECCOMP=y112CONFIG_ISA_DMA_API=y
···103# CONFIG_PREEMPT_VOLUNTARY is not set104# CONFIG_PREEMPT is not set105# CONFIG_PREEMPT_BKL is not set106+# CONFIG_HZ_100 is not set107+CONFIG_HZ_250=y108# CONFIG_HZ_1000 is not set109+CONFIG_HZ=250110CONFIG_GENERIC_HARDIRQS=y111CONFIG_SECCOMP=y112CONFIG_ISA_DMA_API=y
+3-3
arch/ppc64/configs/pSeries_defconfig
···112# CONFIG_PREEMPT_VOLUNTARY is not set113# CONFIG_PREEMPT is not set114# CONFIG_PREEMPT_BKL is not set115-CONFIG_HZ_100=y116-# CONFIG_HZ_250 is not set117# CONFIG_HZ_1000 is not set118-CONFIG_HZ=100119CONFIG_EEH=y120CONFIG_GENERIC_HARDIRQS=y121CONFIG_PPC_RTAS=y
···112# CONFIG_PREEMPT_VOLUNTARY is not set113# CONFIG_PREEMPT is not set114# CONFIG_PREEMPT_BKL is not set115+# CONFIG_HZ_100 is not set116+CONFIG_HZ_250=y117# CONFIG_HZ_1000 is not set118+CONFIG_HZ=250119CONFIG_EEH=y120CONFIG_GENERIC_HARDIRQS=y121CONFIG_PPC_RTAS=y
+3-3
arch/ppc64/defconfig
···114# CONFIG_PREEMPT_VOLUNTARY is not set115# CONFIG_PREEMPT is not set116# CONFIG_PREEMPT_BKL is not set117-CONFIG_HZ_100=y118-# CONFIG_HZ_250 is not set119# CONFIG_HZ_1000 is not set120-CONFIG_HZ=100121CONFIG_EEH=y122CONFIG_GENERIC_HARDIRQS=y123CONFIG_PPC_RTAS=y
···114# CONFIG_PREEMPT_VOLUNTARY is not set115# CONFIG_PREEMPT is not set116# CONFIG_PREEMPT_BKL is not set117+# CONFIG_HZ_100 is not set118+CONFIG_HZ_250=y119# CONFIG_HZ_1000 is not set120+CONFIG_HZ=250121CONFIG_EEH=y122CONFIG_GENERIC_HARDIRQS=y123CONFIG_PPC_RTAS=y
+15-1
arch/ppc64/kernel/head.S
···1269 .= 0x70001270 .globl fwnmi_data_area1271fwnmi_data_area:1272- .space PAGE_SIZE0000000000000012731274/*1275 * On pSeries, secondary processors spin in the following code.
···1269 .= 0x70001270 .globl fwnmi_data_area1271fwnmi_data_area:1272+1273+ /* iSeries does not use the FWNMI stuff, so it is safe to put1274+ * this here, even if we later allow kernels that will boot on1275+ * both pSeries and iSeries */1276+#ifdef CONFIG_PPC_ISERIES1277+ . = LPARMAP_PHYS1278+#include "lparmap.s"1279+/*1280+ * This ".text" is here for old compilers that generate a trailing1281+ * .note section when compiling .c files to .s1282+ */1283+ .text1284+#endif /* CONFIG_PPC_ISERIES */1285+1286+ . = 0x800012871288/*1289 * On pSeries, secondary processors spin in the following code.
+16-5
arch/ppc64/kernel/iSeries_vio.c
···68}6970/**71- * vio_register_device: - Register a new vio device.72 * @voidev: The device to register.73 */74static struct vio_dev *__init vio_register_device_iseries(char *type,···76{77 struct vio_dev *viodev;7879- /* allocate a vio_dev for this node */80 viodev = kmalloc(sizeof(struct vio_dev), GFP_KERNEL);81 if (!viodev)82 return NULL;···8485 snprintf(viodev->dev.bus_id, BUS_ID_SIZE, "%s%d", type, unit_num);8687- return vio_register_device_common(viodev, viodev->dev.bus_id, type,88- unit_num, &vio_iommu_table);000000089}9091void __init probe_bus_iseries(void)···131 return strncmp(dev->type, id->type, strlen(id->type)) == 0;132}1330000134/**135 * vio_bus_init_iseries: - Initialize the iSeries virtual IO bus136 */···142{143 int err;144145- 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}6970/**71+ * vio_register_device_iseries: - Register a new iSeries vio device.72 * @voidev: The device to register.73 */74static struct vio_dev *__init vio_register_device_iseries(char *type,···76{77 struct vio_dev *viodev;7879+ /* allocate a vio_dev for this device */80 viodev = kmalloc(sizeof(struct vio_dev), GFP_KERNEL);81 if (!viodev)82 return NULL;···8485 snprintf(viodev->dev.bus_id, BUS_ID_SIZE, "%s%d", type, unit_num);8687+ 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}9798void __init probe_bus_iseries(void)···124 return strncmp(dev->type, id->type, strlen(id->type)) == 0;125}126127+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 bus133 */···131{132 int err;133134+ 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__);0276 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
···892 if ( RELOC(of_platform) == PLATFORM_PSERIES_LPAR )893 RELOC(alloc_top) = RELOC(rmo_top);894 else895+ /* Some RS64 machines have buggy firmware where claims up at 1GB896+ * fails. Cap at 768MB as a workaround. Still plenty of room.897+ */898+ RELOC(alloc_top) = RELOC(rmo_top) = min(0x30000000ul, RELOC(ram_top));899900 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};3435-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);3940-/* convert from struct device to struct vio_dev and pass to driver.041 * dev->driver has already been set by generic code because vio_bus_match42- * succeeded. */043static int vio_bus_probe(struct device *dev)44{45 struct vio_dev *viodev = to_vio_dev(dev);···50 return error;5152 id = vio_match_device(viodrv->id_table, viodev);53- if (id) {54 error = viodrv->probe(viodev, id);55- }5657 return error;58}···62 struct vio_dev *viodev = to_vio_dev(dev);63 struct vio_driver *viodrv = to_vio_driver(dev->driver);6465- if (viodrv->remove) {66 return viodrv->remove(viodev);67- }6869 /* driver can't remove */70 return 1;···99EXPORT_SYMBOL(vio_unregister_driver);100101/**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 in104- * @dev: the VIO device structure to match against0105 *106 * Used by a driver to check whether a VIO device present in the107 * system is in its list of supported devices. Returns the matching108 * 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 bus124 */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;131132- is_match = match_func;133- unregister_device_callback = unregister_dev;134- release_device_callback = release_dev;135136 err = bus_register(&vio_bus_type);137 if (err) {···134 return err;135 }136137- /* the fake parent of all vio devices, just to give us0138 * a nice directory139 */140 err = device_register(&vio_bus_device.dev);···151/* vio_dev refcount hit 0 */152static 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}158159-static ssize_t viodev_show_name(struct device *dev, struct device_attribute *attr, char *buf)0160{161 return sprintf(buf, "%s\n", to_vio_dev(dev)->name);162}163DEVICE_ATTR(name, S_IRUSR | S_IRGRP | S_IROTH, viodev_show_name, NULL);164165-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;···183184void __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;255256- 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}265266struct bus_type vio_bus_type = {
···32 .dev.bus = &vio_bus_type,33};3435+static struct vio_bus_ops vio_bus_ops;0003637+/*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_match40+ * succeeded.41+ */42static int vio_bus_probe(struct device *dev)43{44 struct vio_dev *viodev = to_vio_dev(dev);···51 return error;5253 id = vio_match_device(viodrv->id_table, viodev);54+ if (id)55 error = viodrv->probe(viodev, id);05657 return error;58}···64 struct vio_dev *viodev = to_vio_dev(dev);65 struct vio_driver *viodrv = to_vio_driver(dev->driver);6667+ if (viodrv->remove)68 return viodrv->remove(viodev);06970 /* driver can't remove */71 return 1;···102EXPORT_SYMBOL(vio_unregister_driver);103104/**105+ * vio_match_device: - Tell if a VIO device has a matching106+ * VIO device id structure.107+ * @ids: array of VIO device id structures to search in108+ * @dev: the VIO device structure to match against109 *110 * Used by a driver to check whether a VIO device present in the111 * system is in its list of supported devices. Returns the matching112 * 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 bus126 */127+int __init vio_bus_init(struct vio_bus_ops *ops)000128{129 int err;130131+ vio_bus_ops = *ops;00132133 err = bus_register(&vio_bus_type);134 if (err) {···141 return err;142 }143144+ /*145+ * The fake parent of all vio devices, just to give us146 * a nice directory147 */148 err = device_register(&vio_bus_device.dev);···157/* vio_dev refcount hit 0 */158static 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}164165+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}170DEVICE_ATTR(name, S_IRUSR | S_IRGRP | S_IROTH, viodev_show_name, NULL);171172+struct vio_dev * __devinit vio_register_device(struct vio_dev *viodev)00173{0000174 /* init generic 'struct device' fields: */175 viodev->dev.parent = &vio_bus_device.dev;176 viodev->dev.bus = &vio_bus_type;···194195void __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;0265266+ return (ids != NULL) && (vio_match_device(ids, vio_dev) != NULL);0000000267}268269struct bus_type vio_bus_type = {
+1-3
arch/ppc64/mm/hash_low.S
···129 * code rather than call a C function...) 130 */131BEGIN_FTR_SECTION132-BEGIN_FTR_SECTION133 mr r4,r30134 mr r5,r7135 bl .hash_page_do_lazy_icache136-END_FTR_SECTION_IFSET(CPU_FTR_NOEXECUTE)137-END_FTR_SECTION_IFCLR(CPU_FTR_COHERENT_ICACHE)138139 /* At this point, r3 contains new PP bits, save them in140 * place of "access" in the param area (sic)
···129 * code rather than call a C function...) 130 */131BEGIN_FTR_SECTION0132 mr r4,r30133 mr r5,r7134 bl .hash_page_do_lazy_icache135+END_FTR_SECTION(CPU_FTR_NOEXECUTE|CPU_FTR_COHERENT_ICACHE, CPU_FTR_NOEXECUTE)0136137 /* At this point, r3 contains new PP bits, save them in138 * place of "access" in the param area (sic)
+1
arch/ppc64/oprofile/common.c
···153154 case PV_970:155 case PV_970FX:0156 model = &op_model_power4;157 model->num_counters = 8;158 ops->cpu_type = "ppc64/970";
···153154 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-#ifndef _PPC64_ERRNO_H2-#define _PPC64_ERRNO_H3-4-/* 5- * This program is free software; you can redistribute it and/or6- * modify it under the terms of the GNU General Public License7- * as published by the Free Software Foundation; either version8- * 2 of the License, or (at your option) any later version.9- */10-11-#include <asm-generic/errno.h>12-13-#undef EDEADLOCK14-#define EDEADLOCK 58 /* File locking deadlock error */15-16-#define _LAST_ERRNO 51617-18-#endif
···1-#ifndef _PPC64_IOCTL_H2-#define _PPC64_IOCTL_H3-4-5-/*6- * This was copied from the alpha as it's a bit cleaner there.7- * -- Cort8- *9- * This program is free software; you can redistribute it and/or10- * modify it under the terms of the GNU General Public License11- * as published by the Free Software Foundation; either version12- * 2 of the License, or (at your option) any later version.13- */14-15-#define _IOC_NRBITS 816-#define _IOC_TYPEBITS 817-#define _IOC_SIZEBITS 1318-#define _IOC_DIRBITS 319-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 026-#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 header33- * files for us.34- */35-#define _IOC_NONE 1U36-#define _IOC_READ 2U37-#define _IOC_WRITE 4U38-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 */
···1-/* 2- * linux/include/asm-ppc/namei.h3- * Adapted from linux/include/asm-alpha/namei.h4- *5- * Included from linux/fs/namei.c6- *7- * This program is free software; you can redistribute it and/or8- * modify it under the terms of the GNU General Public License9- * as published by the Free Software Foundation; either version10- * 2 of the License, or (at your option) any later version.11- */12-13-#ifndef __PPC64_NAMEI_H14-#define __PPC64_NAMEI_H15-16-/* This dummy routine maybe changed to something useful17- * for /usr/gnemul/ emulation stuff.18- * Look at asm-sparc/namei.h for details.19- */20-21-#define __emul_prefix() NULL22-23-#endif /* __PPC64_NAMEI_H */
···00000000000000000000000
+3-1
include/asm-ppc64/param.h
···1#ifndef _ASM_PPC64_PARAM_H2#define _ASM_PPC64_PARAM_H3004/*5 * This program is free software; you can redistribute it and/or6 * modify it under the terms of the GNU General Public License···11 */1213#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_H2#define _ASM_PPC64_PARAM_H34+#include <linux/config.h>5+6/*7 * This program is free software; you can redistribute it and/or8 * modify it under the terms of the GNU General Public License···9 */1011#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
···489490extern void paging_init(void);4910492#define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) \493 free_pgd_range(tlb, addr, end, floor, ceiling)0494495/*496 * This gets called at the end of handling a page fault, when
···489490extern void paging_init(void);491492+#ifdef CONFIG_HUGETLB_PAGE493#define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) \494 free_pgd_range(tlb, addr, end, floor, ceiling)495+#endif496497/*498 * This gets called at the end of handling a page fault, when
-32
include/asm-ppc64/poll.h
···1-#ifndef __PPC64_POLL_H2-#define __PPC64_POLL_H3-4-/*5- * Copyright (C) 2001 PPC64 Team, IBM Corp6- *7- * This program is free software; you can redistribute it and/or8- * modify it under the terms of the GNU General Public License9- * as published by the Free Software Foundation; either version10- * 2 of the License, or (at your option) any later version.11- */12-13-#define POLLIN 0x000114-#define POLLPRI 0x000215-#define POLLOUT 0x000416-#define POLLERR 0x000817-#define POLLHUP 0x001018-#define POLLNVAL 0x002019-#define POLLRDNORM 0x004020-#define POLLRDBAND 0x008021-#define POLLWRNORM 0x010022-#define POLLWRBAND 0x020023-#define POLLMSG 0x040024-#define POLLREMOVE 0x100025-26-struct pollfd {27- int fd;28- short events;29- short revents;30-};31-32-#endif /* __PPC64_POLL_H */
···1-#ifndef _PPC64_SHMPARAM_H2-#define _PPC64_SHMPARAM_H3-4-/*5- * This program is free software; you can redistribute it and/or6- * modify it under the terms of the GNU General Public License7- * as published by the Free Software Foundation; either version8- * 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 */
···0000000000000
-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/or6- * modify it under the terms of the GNU General Public License7- * as published by the Free Software Foundation; either version8- * 2 of the License, or (at your option) any later version.9- */10-11-#define __HAVE_ARCH_STRCPY12-#define __HAVE_ARCH_STRNCPY13-#define __HAVE_ARCH_STRLEN14-#define __HAVE_ARCH_STRCMP15-#define __HAVE_ARCH_STRCAT16-#define __HAVE_ARCH_MEMSET17-#define __HAVE_ARCH_MEMCPY18-#define __HAVE_ARCH_MEMMOVE19-#define __HAVE_ARCH_MEMCMP20-#define __HAVE_ARCH_MEMCHR21-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_ */
···00000000000000000000000000000000000
-21
include/asm-ppc64/unaligned.h
···1-#ifndef __PPC64_UNALIGNED_H2-#define __PPC64_UNALIGNED_H3-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't8- * be misused in a way that makes them not work on other9- * architectures where unaligned accesses aren't as simple.10- *11- * This program is free software; you can redistribute it and/or12- * modify it under the terms of the GNU General Public License13- * as published by the Free Software Foundation; either version14- * 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 */
···1/*2 * Device tables which are exported to userspace via3- * scripts/table2alias.c. You must keep that file in sync with this4 * header.5 */6···190#endif191};19200000193194/* PCMCIA */195
···1/*2 * Device tables which are exported to userspace via3+ * scripts/mod/file2alias.c. You must keep that file in sync with this4 * header.5 */6···190#endif191};192193+/* VIO */194+struct vio_device_id {195+ char type[32];196+ char compat[32];197+};198199/* PCMCIA */200
+19
scripts/mod/file2alias.c
···341 return 1;342}3430000000000000000344/* Ignore any prefix, eg. v850 prepends _ */345static 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);000441442}443
···341 return 1;342}343344+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 _ */361static 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);428429}430