diff options
| author | Anton Blanchard <anton@samba.org> | 2004-09-07 17:46:47 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-09-07 17:46:47 -0700 |
| commit | ba5d8937f18a7ecb0573de48e0dfadc2a31b7e81 (patch) | |
| tree | 9c2493f1c114246129c1e192676c76f01bb3f518 /include | |
| parent | 34201b6e7e90e619f0ab0379cc86d55b41f95e4c (diff) | |
[PATCH] ppc64: fix __rw_yield prototype
From: Nathan Lynch <nathanl@austin.ibm.com>
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 <nathanl@austin.ibm.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-ppc64/spinlock.h | 10 |
1 files changed, 5 insertions, 5 deletions
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) |
