diff options
author | Christian Krafft <krafft@de.ibm.com> | 2006-10-24 12:31:23 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-10-25 00:20:21 -0400 |
commit | e570beb6bb1a623849901efbf939063ec4775c9e (patch) | |
tree | 9d6766eb2ca71393bf16f0aec0cbf726282dea6e /include | |
parent | d8bf96e0793f9576da545bac333b2de304958d68 (diff) |
[POWERPC] cell: add support for registering sysfs attributes to spus
In order to add sysfs attributes to all spu's, there is a
need for a list of all available spu's. Adding the device_node
makes also sense, as it is needed for proper register access.
This patch also adds two functions to create and remove sysfs
attributes and attribute_groups to all spus.
That allows to group spu attributes in a subdirectory like:
/sys/devices/system/spu/spuX/group_name/what_ever
This will be used by cbe_thermal to group all attributes dealing with
thermal support in one directory.
Signed-off-by: Christian Krafft <krafft@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-powerpc/spu.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/asm-powerpc/spu.h b/include/asm-powerpc/spu.h index 704e8a8d2ebd..ffa4df083609 100644 --- a/include/asm-powerpc/spu.h +++ b/include/asm-powerpc/spu.h | |||
@@ -115,6 +115,7 @@ struct spu { | |||
115 | struct spu_priv2 __iomem *priv2; | 115 | struct spu_priv2 __iomem *priv2; |
116 | struct list_head list; | 116 | struct list_head list; |
117 | struct list_head sched_list; | 117 | struct list_head sched_list; |
118 | struct list_head full_list; | ||
118 | int number; | 119 | int number; |
119 | int nid; | 120 | int nid; |
120 | unsigned int irqs[3]; | 121 | unsigned int irqs[3]; |
@@ -143,6 +144,8 @@ struct spu { | |||
143 | char irq_c1[8]; | 144 | char irq_c1[8]; |
144 | char irq_c2[8]; | 145 | char irq_c2[8]; |
145 | 146 | ||
147 | struct device_node *devnode; | ||
148 | |||
146 | struct sys_device sysdev; | 149 | struct sys_device sysdev; |
147 | }; | 150 | }; |
148 | 151 | ||
@@ -200,6 +203,12 @@ static inline void unregister_spu_syscalls(struct spufs_calls *calls) | |||
200 | } | 203 | } |
201 | #endif /* MODULE */ | 204 | #endif /* MODULE */ |
202 | 205 | ||
206 | int spu_add_sysdev_attr(struct sysdev_attribute *attr); | ||
207 | void spu_remove_sysdev_attr(struct sysdev_attribute *attr); | ||
208 | |||
209 | int spu_add_sysdev_attr_group(struct attribute_group *attrs); | ||
210 | void spu_remove_sysdev_attr_group(struct attribute_group *attrs); | ||
211 | |||
203 | 212 | ||
204 | /* | 213 | /* |
205 | * Notifier blocks: | 214 | * Notifier blocks: |