Driver core: add dev_archdata to struct device
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>
This commit is contained in:
Родитель
d80f19fab8
Коммит
c6dbaef22a
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Arch specific extensions to struct device
|
||||||
|
*
|
||||||
|
* This file is released under the GPLv2
|
||||||
|
*/
|
||||||
|
#include <asm-generic/device.h>
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Arch specific extensions to struct device
|
||||||
|
*
|
||||||
|
* This file is released under the GPLv2
|
||||||
|
*/
|
||||||
|
#include <asm-generic/device.h>
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Arch specific extensions to struct device
|
||||||
|
*
|
||||||
|
* This file is released under the GPLv2
|
||||||
|
*/
|
||||||
|
#include <asm-generic/device.h>
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Arch specific extensions to struct device
|
||||||
|
*
|
||||||
|
* This file is released under the GPLv2
|
||||||
|
*/
|
||||||
|
#include <asm-generic/device.h>
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Arch specific extensions to struct device
|
||||||
|
*
|
||||||
|
* This file is released under the GPLv2
|
||||||
|
*/
|
||||||
|
#include <asm-generic/device.h>
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Arch specific extensions to struct device
|
||||||
|
*
|
||||||
|
* This file is released under the GPLv2
|
||||||
|
*/
|
||||||
|
#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 */
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Arch specific extensions to struct device
|
||||||
|
*
|
||||||
|
* This file is released under the GPLv2
|
||||||
|
*/
|
||||||
|
#include <asm-generic/device.h>
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Arch specific extensions to struct device
|
||||||
|
*
|
||||||
|
* This file is released under the GPLv2
|
||||||
|
*/
|
||||||
|
#include <asm-generic/device.h>
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Arch specific extensions to struct device
|
||||||
|
*
|
||||||
|
* This file is released under the GPLv2
|
||||||
|
*/
|
||||||
|
#include <asm-generic/device.h>
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Arch specific extensions to struct device
|
||||||
|
*
|
||||||
|
* This file is released under the GPLv2
|
||||||
|
*/
|
||||||
|
#include <asm-generic/device.h>
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Arch specific extensions to struct device
|
||||||
|
*
|
||||||
|
* This file is released under the GPLv2
|
||||||
|
*/
|
||||||
|
#include <asm-generic/device.h>
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Arch specific extensions to struct device
|
||||||
|
*
|
||||||
|
* This file is released under the GPLv2
|
||||||
|
*/
|
||||||
|
#include <asm-generic/device.h>
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Arch specific extensions to struct device
|
||||||
|
*
|
||||||
|
* This file is released under the GPLv2
|
||||||
|
*/
|
||||||
|
#include <asm-generic/device.h>
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Arch specific extensions to struct device
|
||||||
|
*
|
||||||
|
* This file is released under the GPLv2
|
||||||
|
*/
|
||||||
|
#include <asm-generic/device.h>
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Arch specific extensions to struct device
|
||||||
|
*
|
||||||
|
* This file is released under the GPLv2
|
||||||
|
*/
|
||||||
|
#include <asm-generic/device.h>
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Arch specific extensions to struct device
|
||||||
|
*
|
||||||
|
* This file is released under the GPLv2
|
||||||
|
*/
|
||||||
|
#include <asm-generic/device.h>
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Arch specific extensions to struct device
|
||||||
|
*
|
||||||
|
* This file is released under the GPLv2
|
||||||
|
*/
|
||||||
|
#include <asm-generic/device.h>
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Arch specific extensions to struct device
|
||||||
|
*
|
||||||
|
* This file is released under the GPLv2
|
||||||
|
*/
|
||||||
|
#include <asm-generic/device.h>
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Arch specific extensions to struct device
|
||||||
|
*
|
||||||
|
* This file is released under the GPLv2
|
||||||
|
*/
|
||||||
|
#include <asm-generic/device.h>
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Arch specific extensions to struct device
|
||||||
|
*
|
||||||
|
* This file is released under the GPLv2
|
||||||
|
*/
|
||||||
|
#include <asm-generic/device.h>
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Arch specific extensions to struct device
|
||||||
|
*
|
||||||
|
* This file is released under the GPLv2
|
||||||
|
*/
|
||||||
|
#include <asm-generic/device.h>
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Arch specific extensions to struct device
|
||||||
|
*
|
||||||
|
* This file is released under the GPLv2
|
||||||
|
*/
|
||||||
|
#include <asm-generic/device.h>
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Arch specific extensions to struct device
|
||||||
|
*
|
||||||
|
* This file is released under the GPLv2
|
||||||
|
*/
|
||||||
|
#include <asm-generic/device.h>
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Arch specific extensions to struct device
|
||||||
|
*
|
||||||
|
* This file is released under the GPLv2
|
||||||
|
*/
|
||||||
|
#include <asm-generic/device.h>
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Arch specific extensions to struct device
|
||||||
|
*
|
||||||
|
* This file is released under the GPLv2
|
||||||
|
*/
|
||||||
|
#include <asm-generic/device.h>
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#include <linux/pm.h>
|
#include <linux/pm.h>
|
||||||
#include <asm/semaphore.h>
|
#include <asm/semaphore.h>
|
||||||
#include <asm/atomic.h>
|
#include <asm/atomic.h>
|
||||||
|
#include <asm/device.h>
|
||||||
|
|
||||||
#define DEVICE_NAME_SIZE 50
|
#define DEVICE_NAME_SIZE 50
|
||||||
#define DEVICE_NAME_HALF __stringify(20) /* Less than half to accommodate slop */
|
#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
|
struct dma_coherent_mem *dma_mem; /* internal for coherent mem
|
||||||
override */
|
override */
|
||||||
|
/* arch specific additions */
|
||||||
|
struct dev_archdata archdata;
|
||||||
|
|
||||||
/* class_device migration path */
|
/* class_device migration path */
|
||||||
struct list_head node;
|
struct list_head node;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче