Subject: Add arch specific dev_sysdata to struct device From: Benjamin Herrenschmidt Adds an arch specific struct dev_sysdata to struct device. This enables architecture to add specific fields to every device in the system, like DMA operation pointers, NUMA node ID, firmware specific data, etc... Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Arnd Bergmann include/asm-alpha/device.h | 14 ++++++++++++++ include/asm-arm/device.h | 14 ++++++++++++++ include/asm-arm26/device.h | 14 ++++++++++++++ include/asm-avr32/device.h | 14 ++++++++++++++ include/asm-cris/device.h | 14 ++++++++++++++ include/asm-frv/device.h | 14 ++++++++++++++ include/asm-generic/device.h | 14 ++++++++++++++ include/asm-h8300/device.h | 14 ++++++++++++++ include/asm-i386/device.h | 14 ++++++++++++++ include/asm-ia64/device.h | 14 ++++++++++++++ include/asm-m32r/device.h | 14 ++++++++++++++ include/asm-m68k/device.h | 14 ++++++++++++++ include/asm-m68knommu/device.h | 14 ++++++++++++++ include/asm-mips/device.h | 14 ++++++++++++++ include/asm-parisc/device.h | 14 ++++++++++++++ include/asm-powerpc/device.h | 14 ++++++++++++++ include/asm-ppc/device.h | 14 ++++++++++++++ include/asm-s390/device.h | 14 ++++++++++++++ include/asm-sh/device.h | 14 ++++++++++++++ include/asm-sh64/device.h | 14 ++++++++++++++ include/asm-sparc/device.h | 14 ++++++++++++++ include/asm-sparc64/device.h | 14 ++++++++++++++ include/asm-um/device.h | 14 ++++++++++++++ include/asm-v850/device.h | 14 ++++++++++++++ include/asm-x86_64/device.h | 14 ++++++++++++++ include/asm-xtensa/device.h | 14 ++++++++++++++ include/linux/device.h | 3 +++ 27 files changed, 367 insertions(+) Index: linux-2.6/include/asm-alpha/device.h =================================================================== --- /dev/null +++ linux-2.6/include/asm-alpha/device.h @@ -0,0 +1,14 @@ +/* + * Arch specific extensions to struct device + * + * This file is released under the GPLv2 + * + * See Documentation/driver-model/ for more information. + */ +#ifndef _ASM_DEVICE_H +#define _ASM_DEVICE_H + +struct dev_sysdata { +}; + +#endif /* _ASM_DEVICE_H */ Index: linux-2.6/include/asm-arm/device.h =================================================================== --- /dev/null +++ linux-2.6/include/asm-arm/device.h @@ -0,0 +1,14 @@ +/* + * Arch specific extensions to struct device + * + * This file is released under the GPLv2 + * + * See Documentation/driver-model/ for more information. + */ +#ifndef _ASM_DEVICE_H +#define _ASM_DEVICE_H + +struct dev_sysdata { +}; + +#endif /* _ASM_DEVICE_H */ Index: linux-2.6/include/asm-arm26/device.h =================================================================== --- /dev/null +++ linux-2.6/include/asm-arm26/device.h @@ -0,0 +1,14 @@ +/* + * Arch specific extensions to struct device + * + * This file is released under the GPLv2 + * + * See Documentation/driver-model/ for more information. + */ +#ifndef _ASM_DEVICE_H +#define _ASM_DEVICE_H + +struct dev_sysdata { +}; + +#endif /* _ASM_DEVICE_H */ Index: linux-2.6/include/asm-avr32/device.h =================================================================== --- /dev/null +++ linux-2.6/include/asm-avr32/device.h @@ -0,0 +1,14 @@ +/* + * Arch specific extensions to struct device + * + * This file is released under the GPLv2 + * + * See Documentation/driver-model/ for more information. + */ +#ifndef _ASM_DEVICE_H +#define _ASM_DEVICE_H + +struct dev_sysdata { +}; + +#endif /* _ASM_DEVICE_H */ Index: linux-2.6/include/asm-cris/device.h =================================================================== --- /dev/null +++ linux-2.6/include/asm-cris/device.h @@ -0,0 +1,14 @@ +/* + * Arch specific extensions to struct device + * + * This file is released under the GPLv2 + * + * See Documentation/driver-model/ for more information. + */ +#ifndef _ASM_DEVICE_H +#define _ASM_DEVICE_H + +struct dev_sysdata { +}; + +#endif /* _ASM_DEVICE_H */ Index: linux-2.6/include/asm-frv/device.h =================================================================== --- /dev/null +++ linux-2.6/include/asm-frv/device.h @@ -0,0 +1,14 @@ +/* + * Arch specific extensions to struct device + * + * This file is released under the GPLv2 + * + * See Documentation/driver-model/ for more information. + */ +#ifndef _ASM_DEVICE_H +#define _ASM_DEVICE_H + +struct dev_sysdata { +}; + +#endif /* _ASM_DEVICE_H */ Index: linux-2.6/include/asm-generic/device.h =================================================================== --- /dev/null +++ linux-2.6/include/asm-generic/device.h @@ -0,0 +1,14 @@ +/* + * Arch specific extensions to struct device + * + * This file is released under the GPLv2 + * + * See Documentation/driver-model/ for more information. + */ +#ifndef _ASM_DEVICE_H +#define _ASM_DEVICE_H + +struct dev_sysdata { +}; + +#endif /* _ASM_DEVICE_H */ Index: linux-2.6/include/asm-h8300/device.h =================================================================== --- /dev/null +++ linux-2.6/include/asm-h8300/device.h @@ -0,0 +1,14 @@ +/* + * Arch specific extensions to struct device + * + * This file is released under the GPLv2 + * + * See Documentation/driver-model/ for more information. + */ +#ifndef _ASM_DEVICE_H +#define _ASM_DEVICE_H + +struct dev_sysdata { +}; + +#endif /* _ASM_DEVICE_H */ Index: linux-2.6/include/asm-i386/device.h =================================================================== --- /dev/null +++ linux-2.6/include/asm-i386/device.h @@ -0,0 +1,14 @@ +/* + * Arch specific extensions to struct device + * + * This file is released under the GPLv2 + * + * See Documentation/driver-model/ for more information. + */ +#ifndef _ASM_DEVICE_H +#define _ASM_DEVICE_H + +struct dev_sysdata { +}; + +#endif /* _ASM_DEVICE_H */ Index: linux-2.6/include/asm-ia64/device.h =================================================================== --- /dev/null +++ linux-2.6/include/asm-ia64/device.h @@ -0,0 +1,14 @@ +/* + * Arch specific extensions to struct device + * + * This file is released under the GPLv2 + * + * See Documentation/driver-model/ for more information. + */ +#ifndef _ASM_DEVICE_H +#define _ASM_DEVICE_H + +struct dev_sysdata { +}; + +#endif /* _ASM_DEVICE_H */ Index: linux-2.6/include/asm-m32r/device.h =================================================================== --- /dev/null +++ linux-2.6/include/asm-m32r/device.h @@ -0,0 +1,14 @@ +/* + * Arch specific extensions to struct device + * + * This file is released under the GPLv2 + * + * See Documentation/driver-model/ for more information. + */ +#ifndef _ASM_DEVICE_H +#define _ASM_DEVICE_H + +struct dev_sysdata { +}; + +#endif /* _ASM_DEVICE_H */ Index: linux-2.6/include/asm-m68k/device.h =================================================================== --- /dev/null +++ linux-2.6/include/asm-m68k/device.h @@ -0,0 +1,14 @@ +/* + * Arch specific extensions to struct device + * + * This file is released under the GPLv2 + * + * See Documentation/driver-model/ for more information. + */ +#ifndef _ASM_DEVICE_H +#define _ASM_DEVICE_H + +struct dev_sysdata { +}; + +#endif /* _ASM_DEVICE_H */ Index: linux-2.6/include/asm-m68knommu/device.h =================================================================== --- /dev/null +++ linux-2.6/include/asm-m68knommu/device.h @@ -0,0 +1,14 @@ +/* + * Arch specific extensions to struct device + * + * This file is released under the GPLv2 + * + * See Documentation/driver-model/ for more information. + */ +#ifndef _ASM_DEVICE_H +#define _ASM_DEVICE_H + +struct dev_sysdata { +}; + +#endif /* _ASM_DEVICE_H */ Index: linux-2.6/include/asm-mips/device.h =================================================================== --- /dev/null +++ linux-2.6/include/asm-mips/device.h @@ -0,0 +1,14 @@ +/* + * Arch specific extensions to struct device + * + * This file is released under the GPLv2 + * + * See Documentation/driver-model/ for more information. + */ +#ifndef _ASM_DEVICE_H +#define _ASM_DEVICE_H + +struct dev_sysdata { +}; + +#endif /* _ASM_DEVICE_H */ Index: linux-2.6/include/asm-parisc/device.h =================================================================== --- /dev/null +++ linux-2.6/include/asm-parisc/device.h @@ -0,0 +1,14 @@ +/* + * Arch specific extensions to struct device + * + * This file is released under the GPLv2 + * + * See Documentation/driver-model/ for more information. + */ +#ifndef _ASM_DEVICE_H +#define _ASM_DEVICE_H + +struct dev_sysdata { +}; + +#endif /* _ASM_DEVICE_H */ Index: linux-2.6/include/asm-powerpc/device.h =================================================================== --- /dev/null +++ linux-2.6/include/asm-powerpc/device.h @@ -0,0 +1,14 @@ +/* + * Arch specific extensions to struct device + * + * This file is released under the GPLv2 + * + * See Documentation/driver-model/ for more information. + */ +#ifndef _ASM_DEVICE_H +#define _ASM_DEVICE_H + +struct dev_sysdata { +}; + +#endif /* _ASM_DEVICE_H */ Index: linux-2.6/include/asm-ppc/device.h =================================================================== --- /dev/null +++ linux-2.6/include/asm-ppc/device.h @@ -0,0 +1,14 @@ +/* + * Arch specific extensions to struct device + * + * This file is released under the GPLv2 + * + * See Documentation/driver-model/ for more information. + */ +#ifndef _ASM_DEVICE_H +#define _ASM_DEVICE_H + +struct dev_sysdata { +}; + +#endif /* _ASM_DEVICE_H */ Index: linux-2.6/include/asm-s390/device.h =================================================================== --- /dev/null +++ linux-2.6/include/asm-s390/device.h @@ -0,0 +1,14 @@ +/* + * Arch specific extensions to struct device + * + * This file is released under the GPLv2 + * + * See Documentation/driver-model/ for more information. + */ +#ifndef _ASM_DEVICE_H +#define _ASM_DEVICE_H + +struct dev_sysdata { +}; + +#endif /* _ASM_DEVICE_H */ Index: linux-2.6/include/asm-sh/device.h =================================================================== --- /dev/null +++ linux-2.6/include/asm-sh/device.h @@ -0,0 +1,14 @@ +/* + * Arch specific extensions to struct device + * + * This file is released under the GPLv2 + * + * See Documentation/driver-model/ for more information. + */ +#ifndef _ASM_DEVICE_H +#define _ASM_DEVICE_H + +struct dev_sysdata { +}; + +#endif /* _ASM_DEVICE_H */ Index: linux-2.6/include/asm-sh64/device.h =================================================================== --- /dev/null +++ linux-2.6/include/asm-sh64/device.h @@ -0,0 +1,14 @@ +/* + * Arch specific extensions to struct device + * + * This file is released under the GPLv2 + * + * See Documentation/driver-model/ for more information. + */ +#ifndef _ASM_DEVICE_H +#define _ASM_DEVICE_H + +struct dev_sysdata { +}; + +#endif /* _ASM_DEVICE_H */ Index: linux-2.6/include/asm-sparc/device.h =================================================================== --- /dev/null +++ linux-2.6/include/asm-sparc/device.h @@ -0,0 +1,14 @@ +/* + * Arch specific extensions to struct device + * + * This file is released under the GPLv2 + * + * See Documentation/driver-model/ for more information. + */ +#ifndef _ASM_DEVICE_H +#define _ASM_DEVICE_H + +struct dev_sysdata { +}; + +#endif /* _ASM_DEVICE_H */ Index: linux-2.6/include/asm-sparc64/device.h =================================================================== --- /dev/null +++ linux-2.6/include/asm-sparc64/device.h @@ -0,0 +1,14 @@ +/* + * Arch specific extensions to struct device + * + * This file is released under the GPLv2 + * + * See Documentation/driver-model/ for more information. + */ +#ifndef _ASM_DEVICE_H +#define _ASM_DEVICE_H + +struct dev_sysdata { +}; + +#endif /* _ASM_DEVICE_H */ Index: linux-2.6/include/asm-um/device.h =================================================================== --- /dev/null +++ linux-2.6/include/asm-um/device.h @@ -0,0 +1,14 @@ +/* + * Arch specific extensions to struct device + * + * This file is released under the GPLv2 + * + * See Documentation/driver-model/ for more information. + */ +#ifndef _ASM_DEVICE_H +#define _ASM_DEVICE_H + +struct dev_sysdata { +}; + +#endif /* _ASM_DEVICE_H */ Index: linux-2.6/include/asm-v850/device.h =================================================================== --- /dev/null +++ linux-2.6/include/asm-v850/device.h @@ -0,0 +1,14 @@ +/* + * Arch specific extensions to struct device + * + * This file is released under the GPLv2 + * + * See Documentation/driver-model/ for more information. + */ +#ifndef _ASM_DEVICE_H +#define _ASM_DEVICE_H + +struct dev_sysdata { +}; + +#endif /* _ASM_DEVICE_H */ Index: linux-2.6/include/asm-x86_64/device.h =================================================================== --- /dev/null +++ linux-2.6/include/asm-x86_64/device.h @@ -0,0 +1,14 @@ +/* + * Arch specific extensions to struct device + * + * This file is released under the GPLv2 + * + * See Documentation/driver-model/ for more information. + */ +#ifndef _ASM_DEVICE_H +#define _ASM_DEVICE_H + +struct dev_sysdata { +}; + +#endif /* _ASM_DEVICE_H */ Index: linux-2.6/include/asm-xtensa/device.h =================================================================== --- /dev/null +++ linux-2.6/include/asm-xtensa/device.h @@ -0,0 +1,14 @@ +/* + * Arch specific extensions to struct device + * + * This file is released under the GPLv2 + * + * See Documentation/driver-model/ for more information. + */ +#ifndef _ASM_DEVICE_H +#define _ASM_DEVICE_H + +struct dev_sysdata { +}; + +#endif /* _ASM_DEVICE_H */ Index: linux-2.6/include/linux/device.h =================================================================== --- linux-2.6.orig/include/linux/device.h +++ linux-2.6/include/linux/device.h @@ -20,6 +20,7 @@ #include #include #include +#include #define DEVICE_NAME_SIZE 50 #define DEVICE_NAME_HALF __stringify(20) /* Less than half to accommodate slop */ @@ -357,6 +358,8 @@ struct device { struct dma_coherent_mem *dma_mem; /* internal for coherent mem override */ + /* arch specific additions */ + struct dev_sysdata sysdata; /* class_device migration path */ struct list_head node;