aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/char/sclp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/char/sclp.c')
-rw-r--r--drivers/s390/char/sclp.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/s390/char/sclp.c b/drivers/s390/char/sclp.c
index 3457a9a31571..027cdc18df31 100644
--- a/drivers/s390/char/sclp.c
+++ b/drivers/s390/char/sclp.c
@@ -402,6 +402,7 @@ sclp_sync_wait(void)
402 unsigned long flags; 402 unsigned long flags;
403 unsigned long cr0, cr0_sync; 403 unsigned long cr0, cr0_sync;
404 u64 timeout; 404 u64 timeout;
405 int irq_context;
405 406
406 /* We'll be disabling timer interrupts, so we need a custom timeout 407 /* We'll be disabling timer interrupts, so we need a custom timeout
407 * mechanism */ 408 * mechanism */
@@ -414,7 +415,9 @@ sclp_sync_wait(void)
414 } 415 }
415 local_irq_save(flags); 416 local_irq_save(flags);
416 /* Prevent bottom half from executing once we force interrupts open */ 417 /* Prevent bottom half from executing once we force interrupts open */
417 local_bh_disable(); 418 irq_context = in_interrupt();
419 if (!irq_context)
420 local_bh_disable();
418 /* Enable service-signal interruption, disable timer interrupts */ 421 /* Enable service-signal interruption, disable timer interrupts */
419 trace_hardirqs_on(); 422 trace_hardirqs_on();
420 __ctl_store(cr0, 0, 0); 423 __ctl_store(cr0, 0, 0);
@@ -435,7 +438,8 @@ sclp_sync_wait(void)
435 } 438 }
436 local_irq_disable(); 439 local_irq_disable();
437 __ctl_load(cr0, 0, 0); 440 __ctl_load(cr0, 0, 0);
438 _local_bh_enable(); 441 if (!irq_context)
442 _local_bh_enable();
439 local_irq_restore(flags); 443 local_irq_restore(flags);
440} 444}
441 445