diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2005-06-25 17:55:30 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-25 19:24:37 -0400 |
commit | 77fa22450de00d535de2cc8be653983560828000 (patch) | |
tree | 61644edb2263c3d0db3ea9e9518c6f76a60039e0 /include/asm-s390/system.h | |
parent | f901e5d1e06b3326c100c5d0df43656311befb81 (diff) |
[PATCH] s390: improved machine check handling
Improved machine check handling. Kernel is now able to receive machine checks
while in kernel mode (system call, interrupt and program check handling).
Also register validation is now performed.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-s390/system.h')
-rw-r--r-- | include/asm-s390/system.h | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/include/asm-s390/system.h b/include/asm-s390/system.h index 81514d76edc..e3cb3ce1d24 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 | */ | ||
453 | static 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 | ||
456 | extern void smp_ctl_set_bit(int cr, int bit); | 465 | extern void smp_ctl_set_bit(int cr, int bit); |