[PATCH] s390: check for interrupt before waiting
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Fri, 29 Jul 2005 21:03:36 +0000 (14:03 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 29 Jul 2005 22:01:14 +0000 (15:01 -0700)
The patch that introduced waiting for interrupts after resetting the reader
can cause the boot to fail because the system is waiting for an interrupt that
will never arrive.  Add code to check if an interrupt is supposed to arrive
before waiting endlessly.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/s390/kernel/head.S
arch/s390/kernel/head64.S

index d12cff11b4bcc242b35ec2198f320dab60606f32..2710e66fefbaf04d7996212bbff1f769950522ed 100644 (file)
@@ -346,6 +346,13 @@ iplstart:
         la    %r2,.Lreset              
         lhi   %r3,26
        diag  %r2,%r3,8
+       la    %r5,.Lirb
+       stsch 0(%r5)                           # check if irq is pending
+       tm    30(%r5),0x0f                     # by verifying if any of the
+       bnz   .Lwaitforirq                     # activity or status control
+       tm    31(%r5),0xff                     # bits is set in the schib
+       bz    .Lnoreset
+.Lwaitforirq:
        mvc   0x78(8),.Lrdrnewpsw              # set up IO interrupt psw
 .Lwaitrdrirq:
        lpsw  .Lrdrwaitpsw
index 10bc592c36377301f0f7781ac91b9845f9fc8828..9a8263a153cbaf551c89878cb223cade9022164c 100644 (file)
@@ -345,6 +345,13 @@ iplstart:
         la    %r2,.Lreset              
         lhi   %r3,26
        diag  %r2,%r3,8
+       la    %r5,.Lirb
+       stsch 0(%r5)                           # check if irq is pending
+       tm    30(%r5),0x0f                     # by verifying if any of the
+       bnz   .Lwaitforirq                     # activity or status control
+       tm    31(%r5),0xff                     # bits is set in the schib
+       bz    .Lnoreset
+.Lwaitforirq:
        mvc   0x78(8),.Lrdrnewpsw              # set up IO interrupt psw
 .Lwaitrdrirq:
        lpsw  .Lrdrwaitpsw