[PATCH 25/36] Driver core: add dev_archdata to struct device
- From: Greg KH <greg@xxxxxxxxx>
- Date: Fri, 1 Dec 2006 15:21:55 -0800
From: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
Add arch specific dev_archdata to struct device
Adds an arch specific struct dev_arch 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 <benh@xxxxxxxxxxxxxxxxxxx>
Acked-by: Andi Kleen <ak@xxxxxxx>
Acked-By: David Howells <dhowells@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>
---
include/asm-alpha/device.h | 7 +++++++
include/asm-arm/device.h | 7 +++++++
include/asm-arm26/device.h | 7 +++++++
include/asm-avr32/device.h | 7 +++++++
include/asm-cris/device.h | 7 +++++++
include/asm-frv/device.h | 7 +++++++
include/asm-generic/device.h | 12 ++++++++++++
include/asm-h8300/device.h | 7 +++++++
include/asm-i386/device.h | 7 +++++++
include/asm-ia64/device.h | 7 +++++++
include/asm-m32r/device.h | 7 +++++++
include/asm-m68k/device.h | 7 +++++++
include/asm-m68knommu/device.h | 7 +++++++
include/asm-mips/device.h | 7 +++++++
include/asm-parisc/device.h | 7 +++++++
include/asm-powerpc/device.h | 7 +++++++
include/asm-ppc/device.h | 7 +++++++
include/asm-s390/device.h | 7 +++++++
include/asm-sh/device.h | 7 +++++++
include/asm-sh64/device.h | 7 +++++++
include/asm-sparc/device.h | 7 +++++++
include/asm-sparc64/device.h | 7 +++++++
include/asm-um/device.h | 7 +++++++
include/asm-v850/device.h | 7 +++++++
include/asm-x86_64/device.h | 7 +++++++
include/asm-xtensa/device.h | 7 +++++++
include/linux/device.h | 3 +++
27 files changed, 190 insertions(+), 0 deletions(-)
diff --git a/include/asm-alpha/device.h b/include/asm-alpha/device.h
new file mode 100644
index 0000000..d8f9872
--- /dev/null
+++ b/include/asm-alpha/device.h
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/include/asm-arm/device.h b/include/asm-arm/device.h
new file mode 100644
index 0000000..d8f9872
--- /dev/null
+++ b/include/asm-arm/device.h
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/include/asm-arm26/device.h b/include/asm-arm26/device.h
new file mode 100644
index 0000000..d8f9872
--- /dev/null
+++ b/include/asm-arm26/device.h
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/include/asm-avr32/device.h b/include/asm-avr32/device.h
new file mode 100644
index 0000000..d8f9872
--- /dev/null
+++ b/include/asm-avr32/device.h
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/include/asm-cris/device.h b/include/asm-cris/device.h
new file mode 100644
index 0000000..d8f9872
--- /dev/null
+++ b/include/asm-cris/device.h
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/include/asm-frv/device.h b/include/asm-frv/device.h
new file mode 100644
index 0000000..d8f9872
--- /dev/null
+++ b/include/asm-frv/device.h
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/include/asm-generic/device.h b/include/asm-generic/device.h
new file mode 100644
index 0000000..c17c960
--- /dev/null
+++ b/include/asm-generic/device.h
@@ -0,0 +1,12 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#ifndef _ASM_GENERIC_DEVICE_H
+#define _ASM_GENERIC_DEVICE_H
+
+struct dev_archdata {
+};
+
+#endif /* _ASM_GENERIC_DEVICE_H */
diff --git a/include/asm-h8300/device.h b/include/asm-h8300/device.h
new file mode 100644
index 0000000..d8f9872
--- /dev/null
+++ b/include/asm-h8300/device.h
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/include/asm-i386/device.h b/include/asm-i386/device.h
new file mode 100644
index 0000000..d8f9872
--- /dev/null
+++ b/include/asm-i386/device.h
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/include/asm-ia64/device.h b/include/asm-ia64/device.h
new file mode 100644
index 0000000..d8f9872
--- /dev/null
+++ b/include/asm-ia64/device.h
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/include/asm-m32r/device.h b/include/asm-m32r/device.h
new file mode 100644
index 0000000..d8f9872
--- /dev/null
+++ b/include/asm-m32r/device.h
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/include/asm-m68k/device.h b/include/asm-m68k/device.h
new file mode 100644
index 0000000..d8f9872
--- /dev/null
+++ b/include/asm-m68k/device.h
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/include/asm-m68knommu/device.h b/include/asm-m68knommu/device.h
new file mode 100644
index 0000000..d8f9872
--- /dev/null
+++ b/include/asm-m68knommu/device.h
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/include/asm-mips/device.h b/include/asm-mips/device.h
new file mode 100644
index 0000000..d8f9872
--- /dev/null
+++ b/include/asm-mips/device.h
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/include/asm-parisc/device.h b/include/asm-parisc/device.h
new file mode 100644
index 0000000..d8f9872
--- /dev/null
+++ b/include/asm-parisc/device.h
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/include/asm-powerpc/device.h b/include/asm-powerpc/device.h
new file mode 100644
index 0000000..d8f9872
--- /dev/null
+++ b/include/asm-powerpc/device.h
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/include/asm-ppc/device.h b/include/asm-ppc/device.h
new file mode 100644
index 0000000..d8f9872
--- /dev/null
+++ b/include/asm-ppc/device.h
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/include/asm-s390/device.h b/include/asm-s390/device.h
new file mode 100644
index 0000000..d8f9872
--- /dev/null
+++ b/include/asm-s390/device.h
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/include/asm-sh/device.h b/include/asm-sh/device.h
new file mode 100644
index 0000000..d8f9872
--- /dev/null
+++ b/include/asm-sh/device.h
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/include/asm-sh64/device.h b/include/asm-sh64/device.h
new file mode 100644
index 0000000..d8f9872
--- /dev/null
+++ b/include/asm-sh64/device.h
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/include/asm-sparc/device.h b/include/asm-sparc/device.h
new file mode 100644
index 0000000..d8f9872
--- /dev/null
+++ b/include/asm-sparc/device.h
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/include/asm-sparc64/device.h b/include/asm-sparc64/device.h
new file mode 100644
index 0000000..d8f9872
--- /dev/null
+++ b/include/asm-sparc64/device.h
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/include/asm-um/device.h b/include/asm-um/device.h
new file mode 100644
index 0000000..d8f9872
--- /dev/null
+++ b/include/asm-um/device.h
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/include/asm-v850/device.h b/include/asm-v850/device.h
new file mode 100644
index 0000000..d8f9872
--- /dev/null
+++ b/include/asm-v850/device.h
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/include/asm-x86_64/device.h b/include/asm-x86_64/device.h
new file mode 100644
index 0000000..d8f9872
--- /dev/null
+++ b/include/asm-x86_64/device.h
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/include/asm-xtensa/device.h b/include/asm-xtensa/device.h
new file mode 100644
index 0000000..d8f9872
--- /dev/null
+++ b/include/asm-xtensa/device.h
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/include/linux/device.h b/include/linux/device.h
index 00b29e0..5b54d75 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -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 */
@@ -383,6 +384,8 @@ struct device {
struct dma_coherent_mem *dma_mem; /* internal for coherent mem
override */
+ /* arch specific additions */
+ struct dev_archdata archdata;
/* class_device migration path */
struct list_head node;
--
1.4.4.1
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- References:
- [GIT PATCH] Driver core patches for 2.6.19
- From: Greg KH
- [PATCH 1/36] Driver core: add notification of bus events
- From: Greg KH
- [PATCH 2/36] Driver core: fix "driver" symlink timing
- From: Greg KH
- [PATCH 3/36] Driver Core: Move virtual_device_parent() to core.c
- From: Greg KH
- [PATCH 4/36] CONFIG_SYSFS_DEPRECATED
- From: Greg KH
- [PATCH 5/36] Driver core: make old versions of udev work properly
- From: Greg KH
- [PATCH 6/36] CONFIG_SYSFS_DEPRECATED - bus symlinks
- From: Greg KH
- [PATCH 7/36] CONFIG_SYSFS_DEPRECATED - device symlinks
- From: Greg KH
- [PATCH 8/36] CONFIG_SYSFS_DEPRECATED - PHYSDEV* uevent variables
- From: Greg KH
- [PATCH 9/36] CONFIG_SYSFS_DEPRECATED - class symlinks
- From: Greg KH
- [PATCH 10/36] Driver core: convert vt code to use struct device
- From: Greg KH
- [PATCH 11/36] Driver core: convert vc code to use struct device
- From: Greg KH
- [PATCH 12/36] Driver core: change misc class_devices to be real devices
- From: Greg KH
- [PATCH 13/36] Driver core: convert tty core to use struct device
- From: Greg KH
- [PATCH 14/36] Driver core: convert raw device code to use struct device
- From: Greg KH
- [PATCH 15/36] I2C: convert i2c-dev to use struct device instead of struct class_device
- From: Greg KH
- [PATCH 16/36] Driver core: convert msr code to use struct device
- From: Greg KH
- [PATCH 17/36] Driver core: convert cpuid code to use struct device
- From: Greg KH
- [PATCH 18/36] Driver core: convert PPP code to use struct device
- From: Greg KH
- [PATCH 19/36] Driver core: convert ppdev code to use struct device
- From: Greg KH
- [PATCH 20/36] Driver core: convert mmc code to use struct device
- From: Greg KH
- [PATCH 22/36] Driver core: convert fb code to use struct device
- From: Greg KH
- [PATCH 23/36] Driver core: change mem class_devices to be real devices
- From: Greg KH
- [PATCH 24/36] Driver core: convert sound core to use struct device
- From: Greg KH
- [GIT PATCH] Driver core patches for 2.6.19
- Prev by Date: Re: [OHCI] BIOS handoff failed (BIOS bug?)
- Next by Date: Re: [Cluster-devel] Re: [GFS2] Change argument of gfs2_dinode_out [17/70]
- Previous by thread: [PATCH 24/36] Driver core: convert sound core to use struct device
- Next by thread: [PATCH 26/36] ACPI: Change ACPI to use dev_archdata instead of firmware_data
- Index(es):
Relevant Pages
|