Skip to content

Commit

Permalink
Driver core: add dev_archdata to struct device
Browse files Browse the repository at this point in the history
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@kernel.crashing.org>
Acked-by: Andi Kleen <ak@suse.de>
Acked-By: David Howells <dhowells@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
ozbenh authored and gregkh committed Dec 1, 2006
1 parent d80f19f commit c6dbaef
Show file tree
Hide file tree
Showing 27 changed files with 190 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/asm-alpha/device.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* Arch specific extensions to struct device
*
* This file is released under the GPLv2
*/
#include <asm-generic/device.h>

7 changes: 7 additions & 0 deletions include/asm-arm/device.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* Arch specific extensions to struct device
*
* This file is released under the GPLv2
*/
#include <asm-generic/device.h>

7 changes: 7 additions & 0 deletions include/asm-arm26/device.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* Arch specific extensions to struct device
*
* This file is released under the GPLv2
*/
#include <asm-generic/device.h>

7 changes: 7 additions & 0 deletions include/asm-avr32/device.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* Arch specific extensions to struct device
*
* This file is released under the GPLv2
*/
#include <asm-generic/device.h>

7 changes: 7 additions & 0 deletions include/asm-cris/device.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* Arch specific extensions to struct device
*
* This file is released under the GPLv2
*/
#include <asm-generic/device.h>

7 changes: 7 additions & 0 deletions include/asm-frv/device.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* Arch specific extensions to struct device
*
* This file is released under the GPLv2
*/
#include <asm-generic/device.h>

12 changes: 12 additions & 0 deletions include/asm-generic/device.h
Original file line number Diff line number Diff line change
@@ -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 */
7 changes: 7 additions & 0 deletions include/asm-h8300/device.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* Arch specific extensions to struct device
*
* This file is released under the GPLv2
*/
#include <asm-generic/device.h>

7 changes: 7 additions & 0 deletions include/asm-i386/device.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* Arch specific extensions to struct device
*
* This file is released under the GPLv2
*/
#include <asm-generic/device.h>

7 changes: 7 additions & 0 deletions include/asm-ia64/device.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* Arch specific extensions to struct device
*
* This file is released under the GPLv2
*/
#include <asm-generic/device.h>

7 changes: 7 additions & 0 deletions include/asm-m32r/device.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* Arch specific extensions to struct device
*
* This file is released under the GPLv2
*/
#include <asm-generic/device.h>

7 changes: 7 additions & 0 deletions include/asm-m68k/device.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* Arch specific extensions to struct device
*
* This file is released under the GPLv2
*/
#include <asm-generic/device.h>

7 changes: 7 additions & 0 deletions include/asm-m68knommu/device.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* Arch specific extensions to struct device
*
* This file is released under the GPLv2
*/
#include <asm-generic/device.h>

7 changes: 7 additions & 0 deletions include/asm-mips/device.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* Arch specific extensions to struct device
*
* This file is released under the GPLv2
*/
#include <asm-generic/device.h>

7 changes: 7 additions & 0 deletions include/asm-parisc/device.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* Arch specific extensions to struct device
*
* This file is released under the GPLv2
*/
#include <asm-generic/device.h>

7 changes: 7 additions & 0 deletions include/asm-powerpc/device.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* Arch specific extensions to struct device
*
* This file is released under the GPLv2
*/
#include <asm-generic/device.h>

7 changes: 7 additions & 0 deletions include/asm-ppc/device.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* Arch specific extensions to struct device
*
* This file is released under the GPLv2
*/
#include <asm-generic/device.h>

7 changes: 7 additions & 0 deletions include/asm-s390/device.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* Arch specific extensions to struct device
*
* This file is released under the GPLv2
*/
#include <asm-generic/device.h>

7 changes: 7 additions & 0 deletions include/asm-sh/device.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* Arch specific extensions to struct device
*
* This file is released under the GPLv2
*/
#include <asm-generic/device.h>

7 changes: 7 additions & 0 deletions include/asm-sh64/device.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* Arch specific extensions to struct device
*
* This file is released under the GPLv2
*/
#include <asm-generic/device.h>

7 changes: 7 additions & 0 deletions include/asm-sparc/device.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* Arch specific extensions to struct device
*
* This file is released under the GPLv2
*/
#include <asm-generic/device.h>

7 changes: 7 additions & 0 deletions include/asm-sparc64/device.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* Arch specific extensions to struct device
*
* This file is released under the GPLv2
*/
#include <asm-generic/device.h>

7 changes: 7 additions & 0 deletions include/asm-um/device.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* Arch specific extensions to struct device
*
* This file is released under the GPLv2
*/
#include <asm-generic/device.h>

7 changes: 7 additions & 0 deletions include/asm-v850/device.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* Arch specific extensions to struct device
*
* This file is released under the GPLv2
*/
#include <asm-generic/device.h>

7 changes: 7 additions & 0 deletions include/asm-x86_64/device.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* Arch specific extensions to struct device
*
* This file is released under the GPLv2
*/
#include <asm-generic/device.h>

7 changes: 7 additions & 0 deletions include/asm-xtensa/device.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* Arch specific extensions to struct device
*
* This file is released under the GPLv2
*/
#include <asm-generic/device.h>

3 changes: 3 additions & 0 deletions include/linux/device.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit c6dbaef

Please sign in to comment.