aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-s390
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2006-07-12 10:39:58 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2006-07-12 10:39:58 -0400
commitabdba61a4361e5d47c1633c9e7f56d32dbf4aae8 (patch)
tree3299ba0bd644282832c26473f7ee3a8524104d43 /include/asm-s390
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')
-rw-r--r--include/asm-s390/processor.h16
-rw-r--r--include/asm-s390/setup.h3
2 files changed, 9 insertions, 10 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);
199/* 199/*
200 * Give up the time slice of the virtual PU. 200 * Give up the time slice of the virtual PU.
201 */ 201 */
202#ifndef __s390x__ 202static inline void cpu_relax(void)
203# define cpu_relax() asm volatile ("diag 0,0,68" : : : "memory") 203{
204#else /* __s390x__ */ 204 if (MACHINE_HAS_DIAG44)
205# define cpu_relax() \ 205 asm volatile ("diag 0,0,68" : : : "memory");
206 do { \ 206 else
207 if (MACHINE_HAS_DIAG44) \ 207 barrier();
208 asm volatile ("diag 0,0,68" : : : "memory"); \ 208}
209 } while (0)
210#endif /* __s390x__ */
211 209
212/* 210/*
213 * Set PSW to specified value. 211 * Set PSW to specified value.
diff --git a/include/asm-s390/setup.h b/include/asm-s390/setup.h
index da3fd4a7bb32..19e31979309a 100644
--- a/include/asm-s390/setup.h
+++ b/include/asm-s390/setup.h
@@ -40,15 +40,16 @@ extern unsigned long machine_flags;
40#define MACHINE_IS_VM (machine_flags & 1) 40#define MACHINE_IS_VM (machine_flags & 1)
41#define MACHINE_IS_P390 (machine_flags & 4) 41#define MACHINE_IS_P390 (machine_flags & 4)
42#define MACHINE_HAS_MVPG (machine_flags & 16) 42#define MACHINE_HAS_MVPG (machine_flags & 16)
43#define MACHINE_HAS_DIAG44 (machine_flags & 32)
44#define MACHINE_HAS_IDTE (machine_flags & 128) 43#define MACHINE_HAS_IDTE (machine_flags & 128)
45 44
46#ifndef __s390x__ 45#ifndef __s390x__
47#define MACHINE_HAS_IEEE (machine_flags & 2) 46#define MACHINE_HAS_IEEE (machine_flags & 2)
48#define MACHINE_HAS_CSP (machine_flags & 8) 47#define MACHINE_HAS_CSP (machine_flags & 8)
48#define MACHINE_HAS_DIAG44 (1)
49#else /* __s390x__ */ 49#else /* __s390x__ */
50#define MACHINE_HAS_IEEE (1) 50#define MACHINE_HAS_IEEE (1)
51#define MACHINE_HAS_CSP (1) 51#define MACHINE_HAS_CSP (1)
52#define MACHINE_HAS_DIAG44 (machine_flags & 32)
52#endif /* __s390x__ */ 53#endif /* __s390x__ */
53 54
54 55