From abdba61a4361e5d47c1633c9e7f56d32dbf4aae8 Mon Sep 17 00:00:00 2001 From: Heiko Carstens Date: Wed, 12 Jul 2006 16:39:58 +0200 Subject: [S390] cpu_relax() is supposed to have barrier() semantics. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky --- include/asm-s390/processor.h | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'include/asm-s390/processor.h') diff --git a/include/asm-s390/processor.h b/include/asm-s390/processor.h index c5cbc4bd841..5b71d373172 100644 --- a/include/asm-s390/processor.h +++ b/include/asm-s390/processor.h @@ -199,15 +199,13 @@ unsigned long get_wchan(struct task_struct *p); /* * Give up the time slice of the virtual PU. */ -#ifndef __s390x__ -# define cpu_relax() asm volatile ("diag 0,0,68" : : : "memory") -#else /* __s390x__ */ -# define cpu_relax() \ - do { \ - if (MACHINE_HAS_DIAG44) \ - asm volatile ("diag 0,0,68" : : : "memory"); \ - } while (0) -#endif /* __s390x__ */ +static inline void cpu_relax(void) +{ + if (MACHINE_HAS_DIAG44) + asm volatile ("diag 0,0,68" : : : "memory"); + else + barrier(); +} /* * Set PSW to specified value. -- cgit v1.2.3