From ba5d8937f18a7ecb0573de48e0dfadc2a31b7e81 Mon Sep 17 00:00:00 2001 From: Anton Blanchard Date: Tue, 7 Sep 2004 17:46:47 -0700 Subject: [PATCH] ppc64: fix __rw_yield prototype From: Nathan Lynch Hit this in latest bk: include/asm/spinlock.h: In function `_raw_read_lock': include/asm/spinlock.h:198: warning: passing arg 1 of `__rw_yield' from incompatible pointer type include/asm/spinlock.h: In function `_raw_write_lock': include/asm/spinlock.h:255: warning: passing arg 1 of `__rw_yield' from incompatible pointer type This seems to have been broken by the out-of-line spinlocks patch. You won't hit it unless you've enabled CONFIG_PPC_SPLPAR. Use the rwlock_t for the argument type, and move the definition of rwlock_t up next to that of spinlock_t. Signed-off-by: Nathan Lynch Signed-off-by: Anton Blanchard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-ppc64/spinlock.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/asm-ppc64/spinlock.h b/include/asm-ppc64/spinlock.h index 059e28b7d7be..45a6f7545f7d 100644 --- a/include/asm-ppc64/spinlock.h +++ b/include/asm-ppc64/spinlock.h @@ -25,6 +25,10 @@ typedef struct { volatile unsigned int lock; } spinlock_t; +typedef struct { + volatile signed int lock; +} rwlock_t; + #ifdef __KERNEL__ #define SPIN_LOCK_UNLOCKED (spinlock_t) { 0 } @@ -55,7 +59,7 @@ static __inline__ void _raw_spin_unlock(spinlock_t *lock) /* We only yield to the hypervisor if we are in shared processor mode */ #define SHARED_PROCESSOR (get_paca()->lppaca.xSharedProc) extern void __spin_yield(spinlock_t *lock); -extern void __rw_yield(spinlock_t *lock); +extern void __rw_yield(rwlock_t *lock); #else /* SPLPAR || ISERIES */ #define __spin_yield(x) barrier() #define __rw_yield(x) barrier() @@ -134,10 +138,6 @@ static void __inline__ _raw_spin_lock_flags(spinlock_t *lock, unsigned long flag * irq-safe write-lock, but readers can get non-irqsafe * read-locks. */ -typedef struct { - volatile signed int lock; -} rwlock_t; - #define RW_LOCK_UNLOCKED (rwlock_t) { 0 } #define rwlock_init(x) do { *(x) = RW_LOCK_UNLOCKED; } while(0) -- cgit v1.2.3