diff options
author | Frank Munzert <munzert@de.ibm.com> | 2009-03-26 10:23:43 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2009-03-26 10:24:03 -0400 |
commit | 099b765139929efdcf232f8870804accf8c4cdc5 (patch) | |
tree | 9869bb629def6f49d5d3b82e8e0b301cabbc1b8c /arch/s390/include | |
parent | d7fd5f1e3b195a8232b3ed768ac2809ddce8ca46 (diff) |
[S390] Automatic IPL after dump
Provide new shutdown action "dump_reipl" for automatic ipl after dump.
Signed-off-by: Frank Munzert <munzert@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'arch/s390/include')
-rw-r--r-- | arch/s390/include/asm/lowcore.h | 24 | ||||
-rw-r--r-- | arch/s390/include/asm/system.h | 16 |
2 files changed, 29 insertions, 11 deletions
diff --git a/arch/s390/include/asm/lowcore.h b/arch/s390/include/asm/lowcore.h index f3720defdd16..ee4b10ff9387 100644 --- a/arch/s390/include/asm/lowcore.h +++ b/arch/s390/include/asm/lowcore.h | |||
@@ -111,7 +111,7 @@ | |||
111 | 111 | ||
112 | #define __LC_PASTE 0xE40 | 112 | #define __LC_PASTE 0xE40 |
113 | 113 | ||
114 | #define __LC_PANIC_MAGIC 0xE00 | 114 | #define __LC_DUMP_REIPL 0xE00 |
115 | #ifndef __s390x__ | 115 | #ifndef __s390x__ |
116 | #define __LC_PFAULT_INTPARM 0x080 | 116 | #define __LC_PFAULT_INTPARM 0x080 |
117 | #define __LC_CPU_TIMER_SAVE_AREA 0x0D8 | 117 | #define __LC_CPU_TIMER_SAVE_AREA 0x0D8 |
@@ -286,12 +286,14 @@ struct _lowcore | |||
286 | __u64 int_clock; /* 0xc98 */ | 286 | __u64 int_clock; /* 0xc98 */ |
287 | __u8 pad11[0xe00-0xca0]; /* 0xca0 */ | 287 | __u8 pad11[0xe00-0xca0]; /* 0xca0 */ |
288 | 288 | ||
289 | /* 0xe00 is used as indicator for dump tools */ | 289 | /* 0xe00 contains the address of the IPL Parameter */ |
290 | /* whether the kernel died with panic() or not */ | 290 | /* Information block. Dump tools need IPIB for IPL */ |
291 | __u32 panic_magic; /* 0xe00 */ | 291 | /* after dump. */ |
292 | __u32 ipib; /* 0xe00 */ | ||
293 | __u32 ipib_checksum; /* 0xe04 */ | ||
292 | 294 | ||
293 | /* Align to the top 1k of prefix area */ | 295 | /* Align to the top 1k of prefix area */ |
294 | __u8 pad12[0x1000-0xe04]; /* 0xe04 */ | 296 | __u8 pad12[0x1000-0xe08]; /* 0xe08 */ |
295 | #else /* !__s390x__ */ | 297 | #else /* !__s390x__ */ |
296 | /* prefix area: defined by architecture */ | 298 | /* prefix area: defined by architecture */ |
297 | __u32 ccw1[2]; /* 0x000 */ | 299 | __u32 ccw1[2]; /* 0x000 */ |
@@ -379,12 +381,14 @@ struct _lowcore | |||
379 | __u64 int_clock; /* 0xde8 */ | 381 | __u64 int_clock; /* 0xde8 */ |
380 | __u8 pad12[0xe00-0xdf0]; /* 0xdf0 */ | 382 | __u8 pad12[0xe00-0xdf0]; /* 0xdf0 */ |
381 | 383 | ||
382 | /* 0xe00 is used as indicator for dump tools */ | 384 | /* 0xe00 contains the address of the IPL Parameter */ |
383 | /* whether the kernel died with panic() or not */ | 385 | /* Information block. Dump tools need IPIB for IPL */ |
384 | __u32 panic_magic; /* 0xe00 */ | 386 | /* after dump. */ |
387 | __u64 ipib; /* 0xe00 */ | ||
388 | __u32 ipib_checksum; /* 0xe08 */ | ||
385 | 389 | ||
386 | /* Per cpu primary space access list */ | 390 | /* Per cpu primary space access list */ |
387 | __u8 pad_0xe04[0xe38-0xe04]; /* 0xe04 */ | 391 | __u8 pad_0xe0c[0xe38-0xe0c]; /* 0xe0c */ |
388 | __u64 vdso_per_cpu_data; /* 0xe38 */ | 392 | __u64 vdso_per_cpu_data; /* 0xe38 */ |
389 | __u32 paste[16]; /* 0xe40 */ | 393 | __u32 paste[16]; /* 0xe40 */ |
390 | 394 | ||
@@ -433,8 +437,6 @@ static inline __u32 store_prefix(void) | |||
433 | return address; | 437 | return address; |
434 | } | 438 | } |
435 | 439 | ||
436 | #define __PANIC_MAGIC 0xDEADC0DE | ||
437 | |||
438 | #endif | 440 | #endif |
439 | 441 | ||
440 | #endif | 442 | #endif |
diff --git a/arch/s390/include/asm/system.h b/arch/s390/include/asm/system.h index 3a8b26eb1f2e..3f2ccb82b863 100644 --- a/arch/s390/include/asm/system.h +++ b/arch/s390/include/asm/system.h | |||
@@ -458,6 +458,22 @@ static inline unsigned short stap(void) | |||
458 | return cpu_address; | 458 | return cpu_address; |
459 | } | 459 | } |
460 | 460 | ||
461 | static inline u32 cksm(void *addr, unsigned long len) | ||
462 | { | ||
463 | register unsigned long _addr asm("0") = (unsigned long) addr; | ||
464 | register unsigned long _len asm("1") = len; | ||
465 | unsigned long accu = 0; | ||
466 | |||
467 | asm volatile( | ||
468 | "0:\n" | ||
469 | " cksm %0,%1\n" | ||
470 | " jnz 0b\n" | ||
471 | : "+d" (accu), "+d" (_addr), "+d" (_len) | ||
472 | : | ||
473 | : "cc", "memory"); | ||
474 | return accu; | ||
475 | } | ||
476 | |||
461 | extern void (*_machine_restart)(char *command); | 477 | extern void (*_machine_restart)(char *command); |
462 | extern void (*_machine_halt)(void); | 478 | extern void (*_machine_halt)(void); |
463 | extern void (*_machine_power_off)(void); | 479 | extern void (*_machine_power_off)(void); |