aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r--arch/s390/kernel/ipl.c59
-rw-r--r--arch/s390/kernel/reipl.S6
-rw-r--r--arch/s390/kernel/reipl64.S5
-rw-r--r--arch/s390/kernel/reset.S42
4 files changed, 65 insertions, 47 deletions
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c
index a36bea1188d9..9e9972e8a52b 100644
--- a/arch/s390/kernel/ipl.c
+++ b/arch/s390/kernel/ipl.c
@@ -609,42 +609,12 @@ static ssize_t on_panic_store(struct subsystem *subsys, const char *buf,
609static struct subsys_attribute on_panic_attr = 609static struct subsys_attribute on_panic_attr =
610 __ATTR(on_panic, 0644, on_panic_show, on_panic_store); 610 __ATTR(on_panic, 0644, on_panic_show, on_panic_store);
611 611
612static void print_fcp_block(struct ipl_parameter_block *fcp_block)
613{
614 printk(KERN_EMERG "wwpn: %016llx\n",
615 (unsigned long long)fcp_block->ipl_info.fcp.wwpn);
616 printk(KERN_EMERG "lun: %016llx\n",
617 (unsigned long long)fcp_block->ipl_info.fcp.lun);
618 printk(KERN_EMERG "bootprog: %lld\n",
619 (unsigned long long)fcp_block->ipl_info.fcp.bootprog);
620 printk(KERN_EMERG "br_lba: %lld\n",
621 (unsigned long long)fcp_block->ipl_info.fcp.br_lba);
622 printk(KERN_EMERG "device: %llx\n",
623 (unsigned long long)fcp_block->ipl_info.fcp.devno);
624 printk(KERN_EMERG "opt: %x\n", fcp_block->ipl_info.fcp.opt);
625}
626
627void do_reipl(void) 612void do_reipl(void)
628{ 613{
629 struct ccw_dev_id devid; 614 struct ccw_dev_id devid;
630 static char buf[100]; 615 static char buf[100];
631 char loadparm[LOADPARM_LEN + 1]; 616 char loadparm[LOADPARM_LEN + 1];
632 617
633 switch (reipl_type) {
634 case IPL_TYPE_CCW:
635 reipl_get_ascii_loadparm(loadparm);
636 printk(KERN_EMERG "reboot on ccw device: 0.0.%04x\n",
637 reipl_block_ccw->ipl_info.ccw.devno);
638 printk(KERN_EMERG "loadparm = '%s'\n", loadparm);
639 break;
640 case IPL_TYPE_FCP:
641 printk(KERN_EMERG "reboot on fcp device:\n");
642 print_fcp_block(reipl_block_fcp);
643 break;
644 default:
645 break;
646 }
647
648 switch (reipl_method) { 618 switch (reipl_method) {
649 case IPL_METHOD_CCW_CIO: 619 case IPL_METHOD_CCW_CIO:
650 devid.devno = reipl_block_ccw->ipl_info.ccw.devno; 620 devid.devno = reipl_block_ccw->ipl_info.ccw.devno;
@@ -654,6 +624,7 @@ void do_reipl(void)
654 reipl_ccw_dev(&devid); 624 reipl_ccw_dev(&devid);
655 break; 625 break;
656 case IPL_METHOD_CCW_VM: 626 case IPL_METHOD_CCW_VM:
627 reipl_get_ascii_loadparm(loadparm);
657 if (strlen(loadparm) == 0) 628 if (strlen(loadparm) == 0)
658 sprintf(buf, "IPL %X", 629 sprintf(buf, "IPL %X",
659 reipl_block_ccw->ipl_info.ccw.devno); 630 reipl_block_ccw->ipl_info.ccw.devno);
@@ -683,7 +654,6 @@ void do_reipl(void)
683 diag308(DIAG308_IPL, NULL); 654 diag308(DIAG308_IPL, NULL);
684 break; 655 break;
685 } 656 }
686 printk(KERN_EMERG "reboot failed!\n");
687 signal_processor(smp_processor_id(), sigp_stop_and_store_status); 657 signal_processor(smp_processor_id(), sigp_stop_and_store_status);
688} 658}
689 659
@@ -692,19 +662,6 @@ static void do_dump(void)
692 struct ccw_dev_id devid; 662 struct ccw_dev_id devid;
693 static char buf[100]; 663 static char buf[100];
694 664
695 switch (dump_type) {
696 case IPL_TYPE_CCW:
697 printk(KERN_EMERG "Automatic dump on ccw device: 0.0.%04x\n",
698 dump_block_ccw->ipl_info.ccw.devno);
699 break;
700 case IPL_TYPE_FCP:
701 printk(KERN_EMERG "Automatic dump on fcp device:\n");
702 print_fcp_block(dump_block_fcp);
703 break;
704 default:
705 return;
706 }
707
708 switch (dump_method) { 665 switch (dump_method) {
709 case IPL_METHOD_CCW_CIO: 666 case IPL_METHOD_CCW_CIO:
710 smp_send_stop(); 667 smp_send_stop();
@@ -1037,15 +994,21 @@ static void do_reset_calls(void)
1037} 994}
1038 995
1039extern void reset_mcck_handler(void); 996extern void reset_mcck_handler(void);
997extern void reset_pgm_handler(void);
998extern __u32 dump_prefix_page;
1040 999
1041void s390_reset_system(void) 1000void s390_reset_system(void)
1042{ 1001{
1043 struct _lowcore *lc; 1002 struct _lowcore *lc;
1044 1003
1045 /* Stack for interrupt/machine check handler */
1046 lc = (struct _lowcore *)(unsigned long) store_prefix(); 1004 lc = (struct _lowcore *)(unsigned long) store_prefix();
1005
1006 /* Stack for interrupt/machine check handler */
1047 lc->panic_stack = S390_lowcore.panic_stack; 1007 lc->panic_stack = S390_lowcore.panic_stack;
1048 1008
1009 /* Save prefix page address for dump case */
1010 dump_prefix_page = (unsigned long) lc;
1011
1049 /* Disable prefixing */ 1012 /* Disable prefixing */
1050 set_prefix(0); 1013 set_prefix(0);
1051 1014
@@ -1056,5 +1019,11 @@ void s390_reset_system(void)
1056 S390_lowcore.mcck_new_psw.mask = PSW_KERNEL_BITS & ~PSW_MASK_MCHECK; 1019 S390_lowcore.mcck_new_psw.mask = PSW_KERNEL_BITS & ~PSW_MASK_MCHECK;
1057 S390_lowcore.mcck_new_psw.addr = 1020 S390_lowcore.mcck_new_psw.addr =
1058 PSW_ADDR_AMODE | (unsigned long) &reset_mcck_handler; 1021 PSW_ADDR_AMODE | (unsigned long) &reset_mcck_handler;
1022
1023 /* Set new program check handler */
1024 S390_lowcore.program_new_psw.mask = PSW_KERNEL_BITS & ~PSW_MASK_MCHECK;
1025 S390_lowcore.program_new_psw.addr =
1026 PSW_ADDR_AMODE | (unsigned long) &reset_pgm_handler;
1027
1059 do_reset_calls(); 1028 do_reset_calls();
1060} 1029}
diff --git a/arch/s390/kernel/reipl.S b/arch/s390/kernel/reipl.S
index f9434d42ce9f..c3f4d9b95083 100644
--- a/arch/s390/kernel/reipl.S
+++ b/arch/s390/kernel/reipl.S
@@ -16,7 +16,7 @@ do_reipl_asm: basr %r13,0
16 stm %r0,%r15,__LC_GPREGS_SAVE_AREA 16 stm %r0,%r15,__LC_GPREGS_SAVE_AREA
17 stctl %c0,%c15,__LC_CREGS_SAVE_AREA 17 stctl %c0,%c15,__LC_CREGS_SAVE_AREA
18 stam %a0,%a15,__LC_AREGS_SAVE_AREA 18 stam %a0,%a15,__LC_AREGS_SAVE_AREA
19 stpx __LC_PREFIX_SAVE_AREA 19 mvc __LC_PREFIX_SAVE_AREA(4),dump_prefix_page-.Lpg0(%r13)
20 stckc .Lclkcmp-.Lpg0(%r13) 20 stckc .Lclkcmp-.Lpg0(%r13)
21 mvc __LC_CLOCK_COMP_SAVE_AREA(8),.Lclkcmp-.Lpg0(%r13) 21 mvc __LC_CLOCK_COMP_SAVE_AREA(8),.Lclkcmp-.Lpg0(%r13)
22 stpt __LC_CPU_TIMER_SAVE_AREA 22 stpt __LC_CPU_TIMER_SAVE_AREA
@@ -79,3 +79,7 @@ do_reipl_asm: basr %r13,0
79 .long 0x00000000,0x00000000 79 .long 0x00000000,0x00000000
80 .long 0x00000000,0x00000000 80 .long 0x00000000,0x00000000
81 .long 0x00000000,0x00000000 81 .long 0x00000000,0x00000000
82 .globl dump_prefix_page
83dump_prefix_page:
84 .long 0x00000000
85
diff --git a/arch/s390/kernel/reipl64.S b/arch/s390/kernel/reipl64.S
index f18ef260ca23..dbb3eed38865 100644
--- a/arch/s390/kernel/reipl64.S
+++ b/arch/s390/kernel/reipl64.S
@@ -20,7 +20,7 @@ do_reipl_asm: basr %r13,0
20 stg %r0,__LC_GPREGS_SAVE_AREA-0x1000+8(%r1) 20 stg %r0,__LC_GPREGS_SAVE_AREA-0x1000+8(%r1)
21 stctg %c0,%c15,__LC_CREGS_SAVE_AREA-0x1000(%r1) 21 stctg %c0,%c15,__LC_CREGS_SAVE_AREA-0x1000(%r1)
22 stam %a0,%a15,__LC_AREGS_SAVE_AREA-0x1000(%r1) 22 stam %a0,%a15,__LC_AREGS_SAVE_AREA-0x1000(%r1)
23 stpx __LC_PREFIX_SAVE_AREA-0x1000(%r1) 23 mvc __LC_PREFIX_SAVE_AREA-0x1000(4,%r1),dump_prefix_page-.Lpg0(%r13)
24 stfpc __LC_FP_CREG_SAVE_AREA-0x1000(%r1) 24 stfpc __LC_FP_CREG_SAVE_AREA-0x1000(%r1)
25 stckc .Lclkcmp-.Lpg0(%r13) 25 stckc .Lclkcmp-.Lpg0(%r13)
26 mvc __LC_CLOCK_COMP_SAVE_AREA-0x1000(8,%r1),.Lclkcmp-.Lpg0(%r13) 26 mvc __LC_CLOCK_COMP_SAVE_AREA-0x1000(8,%r1),.Lclkcmp-.Lpg0(%r13)
@@ -103,3 +103,6 @@ do_reipl_asm: basr %r13,0
103 .long 0x00000000,0x00000000 103 .long 0x00000000,0x00000000
104 .long 0x00000000,0x00000000 104 .long 0x00000000,0x00000000
105 .long 0x00000000,0x00000000 105 .long 0x00000000,0x00000000
106 .globl dump_prefix_page
107dump_prefix_page:
108 .long 0x00000000
diff --git a/arch/s390/kernel/reset.S b/arch/s390/kernel/reset.S
index be8688c0665c..8a87355161fa 100644
--- a/arch/s390/kernel/reset.S
+++ b/arch/s390/kernel/reset.S
@@ -3,6 +3,7 @@
3 * 3 *
4 * Copyright (C) IBM Corp. 2006 4 * Copyright (C) IBM Corp. 2006
5 * Author(s): Heiko Carstens <heiko.carstens@de.ibm.com> 5 * Author(s): Heiko Carstens <heiko.carstens@de.ibm.com>
6 * Michael Holzheu <holzheu@de.ibm.com>
6 */ 7 */
7 8
8#include <asm/ptrace.h> 9#include <asm/ptrace.h>
@@ -27,6 +28,26 @@ reset_mcck_handler:
27s390_reset_mcck_handler: 28s390_reset_mcck_handler:
28 .quad 0 29 .quad 0
29 30
31 .globl reset_pgm_handler
32reset_pgm_handler:
33 stmg %r0,%r15,__LC_SAVE_AREA
34 basr %r13,0
350: lg %r15,__LC_PANIC_STACK # load panic stack
36 aghi %r15,-STACK_FRAME_OVERHEAD
37 lg %r1,s390_reset_pgm_handler-0b(%r13)
38 ltgr %r1,%r1
39 jz 1f
40 basr %r14,%r1
41 lmg %r0,%r15,__LC_SAVE_AREA
42 lpswe __LC_PGM_OLD_PSW
431: lpswe disabled_wait_psw-0b(%r13)
44 .globl s390_reset_pgm_handler
45s390_reset_pgm_handler:
46 .quad 0
47 .align 8
48disabled_wait_psw:
49 .quad 0x0002000180000000,0x0000000000000000 + reset_pgm_handler
50
30#else /* CONFIG_64BIT */ 51#else /* CONFIG_64BIT */
31 52
32 .globl reset_mcck_handler 53 .globl reset_mcck_handler
@@ -45,4 +66,25 @@ reset_mcck_handler:
45s390_reset_mcck_handler: 66s390_reset_mcck_handler:
46 .long 0 67 .long 0
47 68
69 .globl reset_pgm_handler
70reset_pgm_handler:
71 stm %r0,%r15,__LC_SAVE_AREA
72 basr %r13,0
730: l %r15,__LC_PANIC_STACK # load panic stack
74 ahi %r15,-STACK_FRAME_OVERHEAD
75 l %r1,s390_reset_pgm_handler-0b(%r13)
76 ltr %r1,%r1
77 jz 1f
78 basr %r14,%r1
79 lm %r0,%r15,__LC_SAVE_AREA
80 lpsw __LC_PGM_OLD_PSW
81
821: lpsw disabled_wait_psw-0b(%r13)
83 .globl s390_reset_pgm_handler
84s390_reset_pgm_handler:
85 .long 0
86disabled_wait_psw:
87 .align 8
88 .long 0x000a0000,0x00000000 + reset_pgm_handler
89
48#endif /* CONFIG_64BIT */ 90#endif /* CONFIG_64BIT */