* [patch 2/3] Directed yield: direct yield of spinlocks for powerpc.
@ 2006-09-19 11:19 Martin Schwidefsky
2006-09-21 12:35 ` Paul Mackerras
0 siblings, 1 reply; 2+ messages in thread
From: Martin Schwidefsky @ 2006-09-19 11:19 UTC (permalink / raw)
To: linux-arch, linux-kernel, akpm; +Cc: mingo, paulus
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
[patch 2/3] 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.
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---
include/asm-powerpc/spinlock.h | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff -urpN linux-2.6/include/asm-powerpc/spinlock.h linux-2.6-patched/include/asm-powerpc/spinlock.h
--- linux-2.6/include/asm-powerpc/spinlock.h 2006-09-19 12:59:35.000000000 +0200
+++ linux-2.6-patched/include/asm-powerpc/spinlock.h 2006-09-19 12:59:35.000000000 +0200
@@ -285,9 +285,9 @@ static __inline__ void __raw_write_unloc
rw->lock = 0;
}
-#define _raw_spin_relax(lock) cpu_relax()
-#define _raw_read_relax(lock) cpu_relax()
-#define _raw_write_relax(lock) cpu_relax()
+#define _raw_spin_relax(lock) __spin_yield(lock)
+#define _raw_read_relax(lock) __rw_yield(lock)
+#define _raw_write_relax(lock) __rw_yield(lock)
#endif /* __KERNEL__ */
#endif /* __ASM_SPINLOCK_H */
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-09-21 12:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-19 11:19 [patch 2/3] Directed yield: direct yield of spinlocks for powerpc Martin Schwidefsky
2006-09-21 12:35 ` Paul Mackerras
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox