diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/s390/kernel/Makefile | 2 | ||||
-rw-r--r-- | arch/s390/kernel/reipl_diag.c | 39 | ||||
-rw-r--r-- | arch/s390/kernel/setup.c | 3 | ||||
-rw-r--r-- | arch/s390/kernel/smp.c | 3 |
4 files changed, 46 insertions, 1 deletions
diff --git a/arch/s390/kernel/Makefile b/arch/s390/kernel/Makefile index ab1e49d2e518..8584dd823218 100644 --- a/arch/s390/kernel/Makefile +++ b/arch/s390/kernel/Makefile | |||
@@ -6,7 +6,7 @@ EXTRA_AFLAGS := -traditional | |||
6 | 6 | ||
7 | obj-y := bitmap.o traps.o time.o process.o \ | 7 | obj-y := bitmap.o traps.o time.o process.o \ |
8 | setup.o sys_s390.o ptrace.o signal.o cpcmd.o ebcdic.o \ | 8 | setup.o sys_s390.o ptrace.o signal.o cpcmd.o ebcdic.o \ |
9 | semaphore.o s390_ext.o debug.o profile.o irq.o | 9 | semaphore.o s390_ext.o debug.o profile.o irq.o reipl_diag.o |
10 | 10 | ||
11 | extra-$(CONFIG_ARCH_S390_31) += head.o | 11 | extra-$(CONFIG_ARCH_S390_31) += head.o |
12 | extra-$(CONFIG_ARCH_S390X) += head64.o | 12 | extra-$(CONFIG_ARCH_S390X) += head64.o |
diff --git a/arch/s390/kernel/reipl_diag.c b/arch/s390/kernel/reipl_diag.c new file mode 100644 index 000000000000..83cb42bc0b76 --- /dev/null +++ b/arch/s390/kernel/reipl_diag.c | |||
@@ -0,0 +1,39 @@ | |||
1 | /* | ||
2 | * This file contains the implementation of the | ||
3 | * Linux re-IPL support | ||
4 | * | ||
5 | * (C) Copyright IBM Corp. 2005 | ||
6 | * | ||
7 | * Author(s): Volker Sameske (sameske@de.ibm.com) | ||
8 | * | ||
9 | */ | ||
10 | |||
11 | #include <linux/kernel.h> | ||
12 | |||
13 | static unsigned int reipl_diag_rc1; | ||
14 | static unsigned int reipl_diag_rc2; | ||
15 | |||
16 | /* | ||
17 | * re-IPL the system using the last used IPL parameters | ||
18 | */ | ||
19 | void reipl_diag(void) | ||
20 | { | ||
21 | asm volatile ( | ||
22 | " la %%r4,0\n" | ||
23 | " la %%r5,0\n" | ||
24 | " diag %%r4,%2,0x308\n" | ||
25 | "0:\n" | ||
26 | " st %%r4,%0\n" | ||
27 | " st %%r5,%1\n" | ||
28 | ".section __ex_table,\"a\"\n" | ||
29 | #ifdef __s390x__ | ||
30 | " .align 8\n" | ||
31 | " .quad 0b, 0b\n" | ||
32 | #else | ||
33 | " .align 4\n" | ||
34 | " .long 0b, 0b\n" | ||
35 | #endif | ||
36 | ".previous\n" | ||
37 | : "=m" (reipl_diag_rc1), "=m" (reipl_diag_rc2) | ||
38 | : "d" (3) : "cc", "4", "5" ); | ||
39 | } | ||
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index 907d16ac9dc9..5204778b8e5e 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -261,8 +261,11 @@ void (*_machine_power_off)(void) = machine_power_off_smp; | |||
261 | * Reboot, halt and power_off routines for non SMP. | 261 | * Reboot, halt and power_off routines for non SMP. |
262 | */ | 262 | */ |
263 | extern void reipl(unsigned long devno); | 263 | extern void reipl(unsigned long devno); |
264 | extern void reipl_diag(void); | ||
264 | static void do_machine_restart_nonsmp(char * __unused) | 265 | static void do_machine_restart_nonsmp(char * __unused) |
265 | { | 266 | { |
267 | reipl_diag(); | ||
268 | |||
266 | if (MACHINE_IS_VM) | 269 | if (MACHINE_IS_VM) |
267 | cpcmd ("IPL", NULL, 0); | 270 | cpcmd ("IPL", NULL, 0); |
268 | else | 271 | else |
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index 85222fee4361..e13c87b446b2 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
@@ -65,6 +65,7 @@ extern char vmhalt_cmd[]; | |||
65 | extern char vmpoff_cmd[]; | 65 | extern char vmpoff_cmd[]; |
66 | 66 | ||
67 | extern void reipl(unsigned long devno); | 67 | extern void reipl(unsigned long devno); |
68 | extern void reipl_diag(void); | ||
68 | 69 | ||
69 | static void smp_ext_bitcall(int, ec_bit_sig); | 70 | static void smp_ext_bitcall(int, ec_bit_sig); |
70 | static void smp_ext_bitcall_others(ec_bit_sig); | 71 | static void smp_ext_bitcall_others(ec_bit_sig); |
@@ -283,6 +284,8 @@ static void do_machine_restart(void * __unused) | |||
283 | * interrupted by an external interrupt and s390irq | 284 | * interrupted by an external interrupt and s390irq |
284 | * locks are always held disabled). | 285 | * locks are always held disabled). |
285 | */ | 286 | */ |
287 | reipl_diag(); | ||
288 | |||
286 | if (MACHINE_IS_VM) | 289 | if (MACHINE_IS_VM) |
287 | cpcmd ("IPL", NULL, 0, NULL); | 290 | cpcmd ("IPL", NULL, 0, NULL); |
288 | else | 291 | else |