Commit cdc39363d33506b0e067d41fc91f89d186bdf7f7
Committed by
Linus Torvalds
1 parent
ef6edc9746
Exists in
master
and in
7 other branches
[PATCH] Directed yield: direct yield of spinlocks for powerpc
Powerpc already has a directed yield for CONFIG_PREEMPT="n". To make it work with CONFIG_PREEMPT="y" as well the _raw_{spin,read,write}_relax primitives need to be defined to call __spin_yield() for spinlocks and __rw_yield() for rw-locks. Acked-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing 1 changed file with 3 additions and 3 deletions Side-by-side Diff
include/asm-powerpc/spinlock.h
... | ... | @@ -285,9 +285,9 @@ |
285 | 285 | rw->lock = 0; |
286 | 286 | } |
287 | 287 | |
288 | -#define _raw_spin_relax(lock) cpu_relax() | |
289 | -#define _raw_read_relax(lock) cpu_relax() | |
290 | -#define _raw_write_relax(lock) cpu_relax() | |
288 | +#define _raw_spin_relax(lock) __spin_yield(lock) | |
289 | +#define _raw_read_relax(lock) __rw_yield(lock) | |
290 | +#define _raw_write_relax(lock) __rw_yield(lock) | |
291 | 291 | |
292 | 292 | #endif /* __KERNEL__ */ |
293 | 293 | #endif /* __ASM_SPINLOCK_H */ |