diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2007-11-20 05:13:35 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2007-11-20 05:13:46 -0500 |
commit | b8e7a54cd06b0b0174029ef3a7f5a1415a2c28f2 (patch) | |
tree | e42beedde089c3aabe9df1537ad687f2756a69ac /arch/s390/kernel/entry64.S | |
parent | 37e3a6ac5a30468021a2f366e497d455bbcb5d21 (diff) |
[S390] Fix kernel preemption.
When returning from IRQ handling and TIF_NEED_RESCHED is set we must
call preempt_schedule_irq() instead of schedule().
Otherwise the BKL might be unlocked in schedule() and therfore
everything that relies on the BKL is broken.
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/entry64.S')
-rw-r--r-- | arch/s390/kernel/entry64.S | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S index e15c80efdd05..a3e47b893f07 100644 --- a/arch/s390/kernel/entry64.S +++ b/arch/s390/kernel/entry64.S | |||
@@ -623,15 +623,8 @@ io_preempt: | |||
623 | io_resume_loop: | 623 | io_resume_loop: |
624 | tm __TI_flags+7(%r9),_TIF_NEED_RESCHED | 624 | tm __TI_flags+7(%r9),_TIF_NEED_RESCHED |
625 | jno io_restore | 625 | jno io_restore |
626 | larl %r1,.Lc_pactive | 626 | larl %r14,io_resume_loop |
627 | mvc __TI_precount(4,%r9),0(%r1) | 627 | jg preempt_schedule_irq |
628 | TRACE_IRQS_ON | ||
629 | stosm __SF_EMPTY(%r15),0x03 # reenable interrupts | ||
630 | brasl %r14,schedule # call schedule | ||
631 | stnsm __SF_EMPTY(%r15),0xfc # disable I/O and ext. interrupts | ||
632 | TRACE_IRQS_OFF | ||
633 | xc __TI_precount(4,%r9),__TI_precount(%r9) | ||
634 | j io_resume_loop | ||
635 | #endif | 628 | #endif |
636 | 629 | ||
637 | # | 630 | # |
@@ -1029,7 +1022,6 @@ cleanup_io_leave_insn: | |||
1029 | */ | 1022 | */ |
1030 | .align 4 | 1023 | .align 4 |
1031 | .Lconst: | 1024 | .Lconst: |
1032 | .Lc_pactive: .long PREEMPT_ACTIVE | ||
1033 | .Lnr_syscalls: .long NR_syscalls | 1025 | .Lnr_syscalls: .long NR_syscalls |
1034 | .L0x0130: .short 0x130 | 1026 | .L0x0130: .short 0x130 |
1035 | .L0x0140: .short 0x140 | 1027 | .L0x0140: .short 0x140 |