]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
[S390] Fix IRQ tracing.
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Fri, 27 Jul 2007 10:29:18 +0000 (12:29 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 27 Jul 2007 10:29:19 +0000 (12:29 +0200)
If a machine check is pending and the external or I/O interrupt handler
returns to userspace io_mcck_pending is going to call s390_handle_mcck.
Before this happens a call to TRACE_IRQS_ON was already made since we
know that we are going back to userspace and hence interrupts will be
enabled. So there was an indication that interrupts are enabled while
in reality they are still disabled.
s390_handle_mcck will do a local_irq_save/restore pair and confuse
lockdep which later complains about inconsistent irq tracing.
To solve this just call trace_hardirqs_off before calling
s390_handle_mcck and trace_hardirqs_on afterwards.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/kernel/entry.S
arch/s390/kernel/entry64.S

index bc7ff3658c3d4a4bb5bcf2db392abeecc7191d74..f3bceb165321e2bb3d57430a1b5fd8c90e7fbd9e 100644 (file)
@@ -624,9 +624,11 @@ io_work_loop:
 # _TIF_MCCK_PENDING is set, call handler
 #
 io_mcck_pending:
+       TRACE_IRQS_OFF
        l       %r1,BASED(.Ls390_handle_mcck)
-       la      %r14,BASED(io_work_loop)
-       br      %r1                     # TIF bit will be cleared by handler
+       basr    %r14,%r1                # TIF bit will be cleared by handler
+       TRACE_IRQS_ON
+       b       BASED(io_work_loop)
 
 #
 # _TIF_NEED_RESCHED is set, call schedule
index 2a7b1304418ba6ab8da72e923b8c99abb004d84f..9c0d5cc8269dd321a17da58a8046f2a20a2621ce 100644 (file)
@@ -611,8 +611,10 @@ io_work_loop:
 # _TIF_MCCK_PENDING is set, call handler
 #
 io_mcck_pending:
-       larl    %r14,io_work_loop
-       jg      s390_handle_mcck        # TIF bit will be cleared by handler
+       TRACE_IRQS_OFF
+       brasl   %r14,s390_handle_mcck   # TIF bit will be cleared by handler
+       TRACE_IRQS_ON
+       j       io_work_loop
 
 #
 # _TIF_NEED_RESCHED is set, call schedule