diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2010-04-09 07:43:00 -0400 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2010-04-09 07:43:02 -0400 |
commit | 176b1803ce4690d0dd94e16f118dbd14af045034 (patch) | |
tree | 92601341680bf89e42ed0073bd5086d16405356c /arch/s390/kernel/entry.S | |
parent | 35ac734f72d846f250c0344913a91f954ea764c3 (diff) |
[S390] fix io_return critical section cleanup
If a machine check interrupts the io interrupt handler on one of the
instructions between io_return and io_leave the critical section
cleanup code will move the return psw to io_work_loop. By doing that
the switch from the asynchronous interrupt stack to the process stack
is skipped. If e.g. TIF_NEED_RESCHED is set things break because
the scheduler is called with the asynchronous interrupts stack.
Moving the psw back to io_return instead fixes the problem.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/entry.S')
-rw-r--r-- | arch/s390/kernel/entry.S | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S index 4348f9bc5393..6af7045280a8 100644 --- a/arch/s390/kernel/entry.S +++ b/arch/s390/kernel/entry.S | |||
@@ -964,7 +964,7 @@ cleanup_critical: | |||
964 | clc 4(4,%r12),BASED(cleanup_table_io_work_loop) | 964 | clc 4(4,%r12),BASED(cleanup_table_io_work_loop) |
965 | bl BASED(0f) | 965 | bl BASED(0f) |
966 | clc 4(4,%r12),BASED(cleanup_table_io_work_loop+4) | 966 | clc 4(4,%r12),BASED(cleanup_table_io_work_loop+4) |
967 | bl BASED(cleanup_io_return) | 967 | bl BASED(cleanup_io_work_loop) |
968 | 0: | 968 | 0: |
969 | br %r14 | 969 | br %r14 |
970 | 970 | ||
@@ -1039,6 +1039,12 @@ cleanup_sysc_leave_insn: | |||
1039 | 1039 | ||
1040 | cleanup_io_return: | 1040 | cleanup_io_return: |
1041 | mvc __LC_RETURN_PSW(4),0(%r12) | 1041 | mvc __LC_RETURN_PSW(4),0(%r12) |
1042 | mvc __LC_RETURN_PSW+4(4),BASED(cleanup_table_io_return) | ||
1043 | la %r12,__LC_RETURN_PSW | ||
1044 | br %r14 | ||
1045 | |||
1046 | cleanup_io_work_loop: | ||
1047 | mvc __LC_RETURN_PSW(4),0(%r12) | ||
1042 | mvc __LC_RETURN_PSW+4(4),BASED(cleanup_table_io_work_loop) | 1048 | mvc __LC_RETURN_PSW+4(4),BASED(cleanup_table_io_work_loop) |
1043 | la %r12,__LC_RETURN_PSW | 1049 | la %r12,__LC_RETURN_PSW |
1044 | br %r14 | 1050 | br %r14 |