summaryrefslogtreecommitdiff
path: root/include/asm-s390/processor.h
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2006-07-12 16:39:58 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2006-07-12 16:39:58 +0200
commitabdba61a4361e5d47c1633c9e7f56d32dbf4aae8 (patch)
tree3299ba0bd644282832c26473f7ee3a8524104d43 /include/asm-s390/processor.h
parent13492c50f69bdf60a42debc6bd3ec49cc1dc941e (diff)
[S390] cpu_relax() is supposed to have barrier() semantics.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'include/asm-s390/processor.h')
-rw-r--r--include/asm-s390/processor.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/include/asm-s390/processor.h b/include/asm-s390/processor.h
index c5cbc4bd8414..5b71d3731723 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.