[POWERPC] cell: register SPUs as sysdevs

SPUs are registered as system devices, exposing attributes through
sysfs. Since the sysdev includes a kref, we can remove the one in
struct spu (it isn't used at the moment anyway).

Currently only the interrupt source and numa node attributes are added.

Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
Jeremy Kerr
2006-06-19 20:33:19 +02:00
committed by Paul Mackerras
parent 0f0f90c304
commit 1d64093f66
2 changed files with 57 additions and 2 deletions
+3 -2
View File
@@ -25,8 +25,8 @@
#ifdef __KERNEL__
#include <linux/config.h>
#include <linux/kref.h>
#include <linux/workqueue.h>
#include <linux/sysdev.h>
#define LS_SIZE (256 * 1024)
#define LS_ADDR_MASK (LS_SIZE - 1)
@@ -123,7 +123,6 @@ struct spu {
u64 flags;
u64 dar;
u64 dsisr;
struct kref kref;
size_t ls_size;
unsigned int slb_replace;
struct mm_struct *mm;
@@ -144,6 +143,8 @@ struct spu {
char irq_c0[8];
char irq_c1[8];
char irq_c2[8];
struct sys_device sysdev;
};
struct spu *spu_alloc(void);