From 1f64643aa5f5a17f1723f7ea0f17b7a3a8f632b3 Mon Sep 17 00:00:00 2001 From: Luke Browning Date: Thu, 5 Jun 2008 17:30:25 +0800 Subject: powerpc/spufs: remove class_0_dsisr from spu exception handling According to the CBEA, the SPU dsisr is not updated for class 0 exceptions. spu_stopped() is testing the dsisr that was passed to it from the class 0 exception handler, so we return a false positive here. This patch cleans up the interrupt handler and erroneous tests in spu_stopped. It also removes the fields from the csa since it is not needed to process class 0 events. Signed-off-by: Luke Browning Signed-off-by: Jeremy Kerr --- include/asm-powerpc/spu.h | 1 - include/asm-powerpc/spu_csa.h | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'include/asm-powerpc') diff --git a/include/asm-powerpc/spu.h b/include/asm-powerpc/spu.h index 6abead6e681a..99348c1f4cab 100644 --- a/include/asm-powerpc/spu.h +++ b/include/asm-powerpc/spu.h @@ -131,7 +131,6 @@ struct spu { u64 flags; u64 class_0_pending; u64 class_0_dar; - u64 class_0_dsisr; u64 class_1_dar; u64 class_1_dsisr; size_t ls_size; diff --git a/include/asm-powerpc/spu_csa.h b/include/asm-powerpc/spu_csa.h index 129ec148d451..a40fd491250c 100644 --- a/include/asm-powerpc/spu_csa.h +++ b/include/asm-powerpc/spu_csa.h @@ -254,7 +254,7 @@ struct spu_state { u64 spu_chnldata_RW[32]; u32 spu_mailbox_data[4]; u32 pu_mailbox_data[1]; - u64 class_0_dar, class_0_dsisr, class_0_pending; + u64 class_0_dar, class_0_pending; u64 class_1_dar, class_1_dsisr; unsigned long suspend_time; spinlock_t register_lock; -- cgit v1.2.3 From 598056d5af8fef1dbe8f96f5c2b641a528184e5a Mon Sep 17 00:00:00 2001 From: Nick Piggin Date: Thu, 22 May 2008 00:10:56 +1000 Subject: [POWERPC] Fix rmb to order cacheable vs. noncacheable lwsync is explicitly defined not to have any effect on the ordering of accesses to device memory, so it cannot be used for rmb(). sync appears to be the only barrier which fits the bill. Signed-off-by: Nick Piggin Acked-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras --- include/asm-powerpc/system.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/asm-powerpc') diff --git a/include/asm-powerpc/system.h b/include/asm-powerpc/system.h index 2b6559a6d113..5235f875b932 100644 --- a/include/asm-powerpc/system.h +++ b/include/asm-powerpc/system.h @@ -34,7 +34,7 @@ * SMP since it is only used to order updates to system memory. */ #define mb() __asm__ __volatile__ ("sync" : : : "memory") -#define rmb() __asm__ __volatile__ (__stringify(LWSYNC) : : : "memory") +#define rmb() __asm__ __volatile__ ("sync" : : : "memory") #define wmb() __asm__ __volatile__ ("sync" : : : "memory") #define read_barrier_depends() do { } while(0) -- cgit v1.2.3 From 305c73687157d677bee6f2a5dbee438d844a028c Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Wed, 11 Jun 2008 03:47:45 +1000 Subject: [POWERPC] Build fix for drivers/macintosh/mediabay.c This fixes the following build error with CONFIG_BLK_DEV_IDE_PMAC=n: <-- snip --> ... CC drivers/macintosh/mediabay.o /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/macintosh/mediabay.c: In function 'check_media_bay': /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/macintosh/mediabay.c:428: error: 'struct media_bay_info' has no member named 'cd_index' make[3]: *** [drivers/macintosh/mediabay.o] Error 1 <-- snip --> Reported-by: Adrian Bunk Signed-off-by: Adrian Bunk Signed-off-by: Paul Mackerras --- include/asm-powerpc/mediabay.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'include/asm-powerpc') diff --git a/include/asm-powerpc/mediabay.h b/include/asm-powerpc/mediabay.h index df111c362a7f..b2efb3325808 100644 --- a/include/asm-powerpc/mediabay.h +++ b/include/asm-powerpc/mediabay.h @@ -17,8 +17,6 @@ #define MB_POWER 6 /* media bay contains a Power device (???) */ #define MB_NO 7 /* media bay contains nothing */ -int check_media_bay(struct device_node *which_bay, int what); - /* Number of bays in the machine or 0 */ extern int media_bay_count; @@ -29,6 +27,16 @@ int check_media_bay_by_base(unsigned long base, int what); /* called by IDE PMAC host driver to register IDE controller for media bay */ int media_bay_set_ide_infos(struct device_node *which_bay, unsigned long base, int irq, ide_hwif_t *hwif); + +int check_media_bay(struct device_node *which_bay, int what); + +#else + +static inline int check_media_bay(struct device_node *which_bay, int what) +{ + return -ENODEV; +} + #endif #endif /* __KERNEL__ */ -- cgit v1.2.3