diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2007-03-05 17:35:43 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2007-03-05 17:35:43 -0500 |
commit | c5dd8586707800cd7bbdefcd675ad7d3c9afcd57 (patch) | |
tree | e80b86321c3e7e2c478ad8d7850d8b3c98be7850 /arch/s390/kernel | |
parent | 25864162c15e61b494aa619974a4d521270362f7 (diff) |
[S390] reipl: move dump_prefix_page out of text section.
Reipl doesn't work on older machines were s390_reset_machine() gets
called. The reason is that the text section is read-only but the
variable dump_prefix_page is there. Since s390_reset_machine() writes
to it we get a protection exception.
Therefore move dump_prefix_page to the bss section.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r-- | arch/s390/kernel/ipl.c | 4 | ||||
-rw-r--r-- | arch/s390/kernel/reipl.S | 13 | ||||
-rw-r--r-- | arch/s390/kernel/reipl64.S | 13 |
3 files changed, 18 insertions, 12 deletions
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c index 5a863a3bf10c..d125a4ead08d 100644 --- a/arch/s390/kernel/ipl.c +++ b/arch/s390/kernel/ipl.c | |||
@@ -1066,7 +1066,7 @@ static void do_reset_calls(void) | |||
1066 | reset->fn(); | 1066 | reset->fn(); |
1067 | } | 1067 | } |
1068 | 1068 | ||
1069 | extern __u32 dump_prefix_page; | 1069 | u32 dump_prefix_page; |
1070 | 1070 | ||
1071 | void s390_reset_system(void) | 1071 | void s390_reset_system(void) |
1072 | { | 1072 | { |
@@ -1078,7 +1078,7 @@ void s390_reset_system(void) | |||
1078 | lc->panic_stack = S390_lowcore.panic_stack; | 1078 | lc->panic_stack = S390_lowcore.panic_stack; |
1079 | 1079 | ||
1080 | /* Save prefix page address for dump case */ | 1080 | /* Save prefix page address for dump case */ |
1081 | dump_prefix_page = (unsigned long) lc; | 1081 | dump_prefix_page = (u32)(unsigned long) lc; |
1082 | 1082 | ||
1083 | /* Disable prefixing */ | 1083 | /* Disable prefixing */ |
1084 | set_prefix(0); | 1084 | set_prefix(0); |
diff --git a/arch/s390/kernel/reipl.S b/arch/s390/kernel/reipl.S index c3f4d9b95083..2f481cc3d1c9 100644 --- a/arch/s390/kernel/reipl.S +++ b/arch/s390/kernel/reipl.S | |||
@@ -8,6 +8,10 @@ | |||
8 | 8 | ||
9 | #include <asm/lowcore.h> | 9 | #include <asm/lowcore.h> |
10 | 10 | ||
11 | # | ||
12 | # do_reipl_asm | ||
13 | # Parameter: r2 = schid of reipl device | ||
14 | # | ||
11 | .globl do_reipl_asm | 15 | .globl do_reipl_asm |
12 | do_reipl_asm: basr %r13,0 | 16 | do_reipl_asm: basr %r13,0 |
13 | .Lpg0: lpsw .Lnewpsw-.Lpg0(%r13) | 17 | .Lpg0: lpsw .Lnewpsw-.Lpg0(%r13) |
@@ -16,12 +20,12 @@ do_reipl_asm: basr %r13,0 | |||
16 | stm %r0,%r15,__LC_GPREGS_SAVE_AREA | 20 | stm %r0,%r15,__LC_GPREGS_SAVE_AREA |
17 | stctl %c0,%c15,__LC_CREGS_SAVE_AREA | 21 | stctl %c0,%c15,__LC_CREGS_SAVE_AREA |
18 | stam %a0,%a15,__LC_AREGS_SAVE_AREA | 22 | stam %a0,%a15,__LC_AREGS_SAVE_AREA |
19 | mvc __LC_PREFIX_SAVE_AREA(4),dump_prefix_page-.Lpg0(%r13) | 23 | l %r10,.Ldump_pfx-.Lpg0(%r13) |
24 | mvc __LC_PREFIX_SAVE_AREA(4),0(%r10) | ||
20 | stckc .Lclkcmp-.Lpg0(%r13) | 25 | stckc .Lclkcmp-.Lpg0(%r13) |
21 | mvc __LC_CLOCK_COMP_SAVE_AREA(8),.Lclkcmp-.Lpg0(%r13) | 26 | mvc __LC_CLOCK_COMP_SAVE_AREA(8),.Lclkcmp-.Lpg0(%r13) |
22 | stpt __LC_CPU_TIMER_SAVE_AREA | 27 | stpt __LC_CPU_TIMER_SAVE_AREA |
23 | st %r13, __LC_PSW_SAVE_AREA+4 | 28 | st %r13, __LC_PSW_SAVE_AREA+4 |
24 | |||
25 | lctl %c6,%c6,.Lall-.Lpg0(%r13) | 29 | lctl %c6,%c6,.Lall-.Lpg0(%r13) |
26 | lr %r1,%r2 | 30 | lr %r1,%r2 |
27 | mvc __LC_PGM_NEW_PSW(8),.Lpcnew-.Lpg0(%r13) | 31 | mvc __LC_PGM_NEW_PSW(8),.Lpcnew-.Lpg0(%r13) |
@@ -55,6 +59,7 @@ do_reipl_asm: basr %r13,0 | |||
55 | .align 8 | 59 | .align 8 |
56 | .Lclkcmp: .quad 0x0000000000000000 | 60 | .Lclkcmp: .quad 0x0000000000000000 |
57 | .Lall: .long 0xff000000 | 61 | .Lall: .long 0xff000000 |
62 | .Ldump_pfx: .long dump_prefix_page | ||
58 | .align 8 | 63 | .align 8 |
59 | .Lnewpsw: .long 0x00080000,0x80000000+.Lpg1 | 64 | .Lnewpsw: .long 0x00080000,0x80000000+.Lpg1 |
60 | .Lpcnew: .long 0x00080000,0x80000000+.Lecs | 65 | .Lpcnew: .long 0x00080000,0x80000000+.Lecs |
@@ -79,7 +84,3 @@ do_reipl_asm: basr %r13,0 | |||
79 | .long 0x00000000,0x00000000 | 84 | .long 0x00000000,0x00000000 |
80 | .long 0x00000000,0x00000000 | 85 | .long 0x00000000,0x00000000 |
81 | .long 0x00000000,0x00000000 | 86 | .long 0x00000000,0x00000000 |
82 | .globl dump_prefix_page | ||
83 | dump_prefix_page: | ||
84 | .long 0x00000000 | ||
85 | |||
diff --git a/arch/s390/kernel/reipl64.S b/arch/s390/kernel/reipl64.S index dbb3eed38865..c41930499a5f 100644 --- a/arch/s390/kernel/reipl64.S +++ b/arch/s390/kernel/reipl64.S | |||
@@ -8,6 +8,12 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <asm/lowcore.h> | 10 | #include <asm/lowcore.h> |
11 | |||
12 | # | ||
13 | # do_reipl_asm | ||
14 | # Parameter: r2 = schid of reipl device | ||
15 | # | ||
16 | |||
11 | .globl do_reipl_asm | 17 | .globl do_reipl_asm |
12 | do_reipl_asm: basr %r13,0 | 18 | do_reipl_asm: basr %r13,0 |
13 | .Lpg0: lpswe .Lnewpsw-.Lpg0(%r13) | 19 | .Lpg0: lpswe .Lnewpsw-.Lpg0(%r13) |
@@ -20,7 +26,8 @@ do_reipl_asm: basr %r13,0 | |||
20 | stg %r0,__LC_GPREGS_SAVE_AREA-0x1000+8(%r1) | 26 | stg %r0,__LC_GPREGS_SAVE_AREA-0x1000+8(%r1) |
21 | stctg %c0,%c15,__LC_CREGS_SAVE_AREA-0x1000(%r1) | 27 | stctg %c0,%c15,__LC_CREGS_SAVE_AREA-0x1000(%r1) |
22 | stam %a0,%a15,__LC_AREGS_SAVE_AREA-0x1000(%r1) | 28 | stam %a0,%a15,__LC_AREGS_SAVE_AREA-0x1000(%r1) |
23 | mvc __LC_PREFIX_SAVE_AREA-0x1000(4,%r1),dump_prefix_page-.Lpg0(%r13) | 29 | lg %r10,.Ldump_pfx-.Lpg0(%r13) |
30 | mvc __LC_PREFIX_SAVE_AREA-0x1000(4,%r1),0(%r10) | ||
24 | stfpc __LC_FP_CREG_SAVE_AREA-0x1000(%r1) | 31 | stfpc __LC_FP_CREG_SAVE_AREA-0x1000(%r1) |
25 | stckc .Lclkcmp-.Lpg0(%r13) | 32 | stckc .Lclkcmp-.Lpg0(%r13) |
26 | mvc __LC_CLOCK_COMP_SAVE_AREA-0x1000(8,%r1),.Lclkcmp-.Lpg0(%r13) | 33 | mvc __LC_CLOCK_COMP_SAVE_AREA-0x1000(8,%r1),.Lclkcmp-.Lpg0(%r13) |
@@ -64,6 +71,7 @@ do_reipl_asm: basr %r13,0 | |||
64 | .align 8 | 71 | .align 8 |
65 | .Lclkcmp: .quad 0x0000000000000000 | 72 | .Lclkcmp: .quad 0x0000000000000000 |
66 | .Lall: .quad 0x00000000ff000000 | 73 | .Lall: .quad 0x00000000ff000000 |
74 | .Ldump_pfx: .quad dump_prefix_page | ||
67 | .Lregsave: .quad 0x0000000000000000 | 75 | .Lregsave: .quad 0x0000000000000000 |
68 | .align 16 | 76 | .align 16 |
69 | /* | 77 | /* |
@@ -103,6 +111,3 @@ do_reipl_asm: basr %r13,0 | |||
103 | .long 0x00000000,0x00000000 | 111 | .long 0x00000000,0x00000000 |
104 | .long 0x00000000,0x00000000 | 112 | .long 0x00000000,0x00000000 |
105 | .long 0x00000000,0x00000000 | 113 | .long 0x00000000,0x00000000 |
106 | .globl dump_prefix_page | ||
107 | dump_prefix_page: | ||
108 | .long 0x00000000 | ||