Commit a8c3cb49 authored by Hendrik Brueckner's avatar Hendrik Brueckner Committed by Martin Schwidefsky

[S390] move (io|sysc)_restore_trace_psw into .data section

The sysc_restore_trace_psw and io_restore_trace_psw storage locations
are created in the .text section. When creating and IPLing from a named
saved system (NSS), writing to these locations causes a protection exception
(because the .text section is mapped as shared read-only in the NSS).

To permit write access, move the storage locations into the .data section.

The problem occurs only when CONFIG_TRACE_IRQFLAGS is set.
The git commmit that has introduced these variables is:
411788eaSigned-off-by: default avatarHendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 18d00acf
...@@ -278,7 +278,8 @@ sysc_return: ...@@ -278,7 +278,8 @@ sysc_return:
bnz BASED(sysc_work) # there is work to do (signals etc.) bnz BASED(sysc_work) # there is work to do (signals etc.)
sysc_restore: sysc_restore:
#ifdef CONFIG_TRACE_IRQFLAGS #ifdef CONFIG_TRACE_IRQFLAGS
la %r1,BASED(sysc_restore_trace_psw) la %r1,BASED(sysc_restore_trace_psw_addr)
l %r1,0(%r1)
lpsw 0(%r1) lpsw 0(%r1)
sysc_restore_trace: sysc_restore_trace:
TRACE_IRQS_CHECK TRACE_IRQS_CHECK
...@@ -289,10 +290,15 @@ sysc_leave: ...@@ -289,10 +290,15 @@ sysc_leave:
sysc_done: sysc_done:
#ifdef CONFIG_TRACE_IRQFLAGS #ifdef CONFIG_TRACE_IRQFLAGS
sysc_restore_trace_psw_addr:
.long sysc_restore_trace_psw
.section .data,"aw",@progbits
.align 8 .align 8
.globl sysc_restore_trace_psw .globl sysc_restore_trace_psw
sysc_restore_trace_psw: sysc_restore_trace_psw:
.long 0, sysc_restore_trace + 0x80000000 .long 0, sysc_restore_trace + 0x80000000
.previous
#endif #endif
# #
...@@ -606,7 +612,8 @@ io_return: ...@@ -606,7 +612,8 @@ io_return:
bnz BASED(io_work) # there is work to do (signals etc.) bnz BASED(io_work) # there is work to do (signals etc.)
io_restore: io_restore:
#ifdef CONFIG_TRACE_IRQFLAGS #ifdef CONFIG_TRACE_IRQFLAGS
la %r1,BASED(io_restore_trace_psw) la %r1,BASED(io_restore_trace_psw_addr)
l %r1,0(%r1)
lpsw 0(%r1) lpsw 0(%r1)
io_restore_trace: io_restore_trace:
TRACE_IRQS_CHECK TRACE_IRQS_CHECK
...@@ -617,10 +624,15 @@ io_leave: ...@@ -617,10 +624,15 @@ io_leave:
io_done: io_done:
#ifdef CONFIG_TRACE_IRQFLAGS #ifdef CONFIG_TRACE_IRQFLAGS
io_restore_trace_psw_addr:
.long io_restore_trace_psw
.section .data,"aw",@progbits
.align 8 .align 8
.globl io_restore_trace_psw .globl io_restore_trace_psw
io_restore_trace_psw: io_restore_trace_psw:
.long 0, io_restore_trace + 0x80000000 .long 0, io_restore_trace + 0x80000000
.previous
#endif #endif
# #
......
...@@ -284,10 +284,12 @@ sysc_leave: ...@@ -284,10 +284,12 @@ sysc_leave:
sysc_done: sysc_done:
#ifdef CONFIG_TRACE_IRQFLAGS #ifdef CONFIG_TRACE_IRQFLAGS
.section .data,"aw",@progbits
.align 8 .align 8
.globl sysc_restore_trace_psw .globl sysc_restore_trace_psw
sysc_restore_trace_psw: sysc_restore_trace_psw:
.quad 0, sysc_restore_trace .quad 0, sysc_restore_trace
.previous
#endif #endif
# #
...@@ -595,10 +597,12 @@ io_leave: ...@@ -595,10 +597,12 @@ io_leave:
io_done: io_done:
#ifdef CONFIG_TRACE_IRQFLAGS #ifdef CONFIG_TRACE_IRQFLAGS
.section .data,"aw",@progbits
.align 8 .align 8
.globl io_restore_trace_psw .globl io_restore_trace_psw
io_restore_trace_psw: io_restore_trace_psw:
.quad 0, io_restore_trace .quad 0, io_restore_trace
.previous
#endif #endif
# #
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment