Add arch specific dev_sysdata to struct device
Subsystems (2)
PATCH 1/2 Add arch specific dev_sysdata to struct device
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...
include/asm-alpha/device.h new file +14 -0
@@ -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 */
include/asm-arm/device.h new file +14 -0
@@ -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 */
include/asm-arm26/device.h new file +14 -0
@@ -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 */
include/asm-avr32/device.h new file +14 -0
@@ -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 */
include/asm-cris/device.h new file +14 -0
@@ -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 */
include/asm-frv/device.h new file +14 -0
@@ -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 */
include/asm-generic/device.h new file +14 -0
@@ -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 */
include/asm-h8300/device.h new file +14 -0
@@ -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 */
include/asm-i386/device.h new file +14 -0
@@ -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 */
include/asm-ia64/device.h new file +14 -0
@@ -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 */
include/asm-m32r/device.h new file +14 -0
@@ -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 */
include/asm-m68k/device.h new file +14 -0
@@ -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 */
include/asm-m68knommu/device.h new file +14 -0
@@ -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 */
include/asm-mips/device.h new file +14 -0
@@ -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 */
include/asm-parisc/device.h new file +14 -0
@@ -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 */
include/asm-powerpc/device.h new file +14 -0
@@ -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 */
include/asm-ppc/device.h new file +14 -0
@@ -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 */
include/asm-s390/device.h new file +14 -0
@@ -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 */
include/asm-sh/device.h new file +14 -0
@@ -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 */
include/asm-sh64/device.h new file +14 -0
@@ -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 */
include/asm-sparc/device.h new file +14 -0
@@ -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 */
include/asm-sparc64/device.h new file +14 -0
@@ -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 */
include/asm-um/device.h new file +14 -0
@@ -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 */
include/asm-v850/device.h new file +14 -0
@@ -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 */
include/asm-x86_64/device.h new file +14 -0
@@ -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 */
include/asm-xtensa/device.h new file +14 -0
@@ -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 */
include/linux/device.h +3 -0
@@ -21,6 +21,7 @@#include <linux/pm.h> #include <asm/semaphore.h> #include <asm/atomic.h> +#include <asm/device.h> #define DEVICE_NAME_SIZE 50#define DEVICE_NAME_HALF __stringify(20)/* Less than half to accommodate slop */
@@ -382,6 +383,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;
Quoted 6 lines · On Fri, 10 Nov 2006 17:58:50 +1100 Benjamin Herrenschmidt…
Adds an arch specific struct
dev_sysdatato 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 <[email protected]>
I would have done this by creating a single line asm-xxx/device.h containing
#include <asm-generic/device.h>
(except for asm-generic, of course) and then as each architecture implements its own dev_sysdata, it can flesh out its asm/device.h.
Also, I would use _ASM_<ARCH>_DEVICE_H, but thats just my preference.
Just suggestions.
--
Cheers,
Stephen Rothwell [email protected]
http://www.canb.auug.org.au/~sfr/
Quoted 11 lines · Stephen Rothwell
Quoted 6 lines · On Fri, 10 Nov 2006 17:58:50 +1100 Benjamin Herrenschmidt…
Adds an arch specific struct
dev_sysdatato 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 <[email protected]>I would have done this by creating a single line
asm-xxx/device.hcontaining#include <
asm-generic/device.h>
A lot of archs will add custome things, so I felt it simpler that way, but I can do it via asm-generic... Anybody else preferring it that way ?
Quoted 4 lines
(except for asm-generic, of course) and then as each architecture implements its own
dev_sysdata, it can flesh out itsasm/device.h.Also, I would use _ASM_<ARCH>_DEVICE_H, but thats just my preference.
Because I'm overly lazy, I prefer just cp'ing an identical file to all asm-* dirs :-) Now I suppose it should be easy to do a little script to get it "right". I'll look into it for the patch renaming it to arch_data, I'll try to get that out later this morning.
Ben.