tree 8c644bec7a82bdb2b4c0c9d30e65fce4b8c15f69
parent 5712f52e8c024c6b7b82ae5c7b5b3d0f3e6f711b
author Heiko Carstens <[EMAIL PROTECTED]> Sat, 30 Jul 2005 04:03:36 -0700
committer Linus Torvalds <[EMAIL PROTECTED]> Sat, 30 Jul 2005 05:01:14 -0700

[PATCH] s390: check for interrupt before waiting

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 <[EMAIL PROTECTED]>
Signed-off-by: Martin Schwidefsky <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

 arch/s390/kernel/head.S   |    7 +++++++
 arch/s390/kernel/head64.S |    7 +++++++
 2 files changed, 14 insertions(+)

diff --git a/arch/s390/kernel/head.S b/arch/s390/kernel/head.S
--- a/arch/s390/kernel/head.S
+++ b/arch/s390/kernel/head.S
@@ -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
diff --git a/arch/s390/kernel/head64.S b/arch/s390/kernel/head64.S
--- a/arch/s390/kernel/head64.S
+++ b/arch/s390/kernel/head64.S
@@ -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
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to