aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-s390/system.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-s390/system.h')
-rw-r--r--include/asm-s390/system.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/include/asm-s390/system.h b/include/asm-s390/system.h
index 81514d76edcf..e3cb3ce1d24a 100644
--- a/include/asm-s390/system.h
+++ b/include/asm-s390/system.h
@@ -16,6 +16,7 @@
16#include <asm/types.h> 16#include <asm/types.h>
17#include <asm/ptrace.h> 17#include <asm/ptrace.h>
18#include <asm/setup.h> 18#include <asm/setup.h>
19#include <asm/processor.h>
19 20
20#ifdef __KERNEL__ 21#ifdef __KERNEL__
21 22
@@ -331,9 +332,6 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size)
331 332
332#ifdef __s390x__ 333#ifdef __s390x__
333 334
334#define __load_psw(psw) \
335 __asm__ __volatile__("lpswe 0(%0)" : : "a" (&psw), "m" (psw) : "cc" );
336
337#define __ctl_load(array, low, high) ({ \ 335#define __ctl_load(array, low, high) ({ \
338 typedef struct { char _[sizeof(array)]; } addrtype; \ 336 typedef struct { char _[sizeof(array)]; } addrtype; \
339 __asm__ __volatile__ ( \ 337 __asm__ __volatile__ ( \
@@ -390,9 +388,6 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size)
390 388
391#else /* __s390x__ */ 389#else /* __s390x__ */
392 390
393#define __load_psw(psw) \
394 __asm__ __volatile__("lpsw 0(%0)" : : "a" (&psw) : "cc" );
395
396#define __ctl_load(array, low, high) ({ \ 391#define __ctl_load(array, low, high) ({ \
397 typedef struct { char _[sizeof(array)]; } addrtype; \ 392 typedef struct { char _[sizeof(array)]; } addrtype; \
398 __asm__ __volatile__ ( \ 393 __asm__ __volatile__ ( \
@@ -451,6 +446,20 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size)
451/* For spinlocks etc */ 446/* For spinlocks etc */
452#define local_irq_save(x) ((x) = local_irq_disable()) 447#define local_irq_save(x) ((x) = local_irq_disable())
453 448
449/*
450 * Use to set psw mask except for the first byte which
451 * won't be changed by this function.
452 */
453static inline void
454__set_psw_mask(unsigned long mask)
455{
456 local_save_flags(mask);
457 __load_psw_mask(mask);
458}
459
460#define local_mcck_enable() __set_psw_mask(PSW_KERNEL_BITS)
461#define local_mcck_disable() __set_psw_mask(PSW_KERNEL_BITS & ~PSW_MASK_MCHECK)
462
454#ifdef CONFIG_SMP 463#ifdef CONFIG_SMP
455 464
456extern void smp_ctl_set_bit(int cr, int bit); 465extern void smp_ctl_set_bit(int cr, int bit);