diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2008-08-01 10:39:11 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2008-08-01 10:39:30 -0400 |
commit | 934b2857cc576ae53c92a66e63fce7ddcfa74691 (patch) | |
tree | 4a8e261d16739624bb91ed9f56062ec5f7401227 /drivers/s390 | |
parent | 3a95e8eb34f595a0144adb6e5513d456319bd8a5 (diff) |
[S390] nohz/sclp: disable timer on synchronous waits.
sclp_sync_wait wait synchronously for an sclp interrupt and disables
timer interrupts. However on the irq enter paths there is an extra
check if a timer interrupt would be due and calls the timer callback.
This would schedule softirqs in the wrong context.
So introduce local_tick_enable/disable which prevents this.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/char/sclp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/s390/char/sclp.c b/drivers/s390/char/sclp.c index 3c8b25e6c345..1fd8f2193ed8 100644 --- a/drivers/s390/char/sclp.c +++ b/drivers/s390/char/sclp.c | |||
@@ -399,6 +399,7 @@ sclp_tod_from_jiffies(unsigned long jiffies) | |||
399 | void | 399 | void |
400 | sclp_sync_wait(void) | 400 | sclp_sync_wait(void) |
401 | { | 401 | { |
402 | unsigned long long old_tick; | ||
402 | unsigned long flags; | 403 | unsigned long flags; |
403 | unsigned long cr0, cr0_sync; | 404 | unsigned long cr0, cr0_sync; |
404 | u64 timeout; | 405 | u64 timeout; |
@@ -419,11 +420,12 @@ sclp_sync_wait(void) | |||
419 | if (!irq_context) | 420 | if (!irq_context) |
420 | local_bh_disable(); | 421 | local_bh_disable(); |
421 | /* Enable service-signal interruption, disable timer interrupts */ | 422 | /* Enable service-signal interruption, disable timer interrupts */ |
423 | old_tick = local_tick_disable(); | ||
422 | trace_hardirqs_on(); | 424 | trace_hardirqs_on(); |
423 | __ctl_store(cr0, 0, 0); | 425 | __ctl_store(cr0, 0, 0); |
424 | cr0_sync = cr0; | 426 | cr0_sync = cr0; |
427 | cr0_sync &= 0xffff00a0; | ||
425 | cr0_sync |= 0x00000200; | 428 | cr0_sync |= 0x00000200; |
426 | cr0_sync &= 0xFFFFF3AC; | ||
427 | __ctl_load(cr0_sync, 0, 0); | 429 | __ctl_load(cr0_sync, 0, 0); |
428 | __raw_local_irq_stosm(0x01); | 430 | __raw_local_irq_stosm(0x01); |
429 | /* Loop until driver state indicates finished request */ | 431 | /* Loop until driver state indicates finished request */ |
@@ -439,9 +441,9 @@ sclp_sync_wait(void) | |||
439 | __ctl_load(cr0, 0, 0); | 441 | __ctl_load(cr0, 0, 0); |
440 | if (!irq_context) | 442 | if (!irq_context) |
441 | _local_bh_enable(); | 443 | _local_bh_enable(); |
444 | local_tick_enable(old_tick); | ||
442 | local_irq_restore(flags); | 445 | local_irq_restore(flags); |
443 | } | 446 | } |
444 | |||
445 | EXPORT_SYMBOL(sclp_sync_wait); | 447 | EXPORT_SYMBOL(sclp_sync_wait); |
446 | 448 | ||
447 | /* Dispatch changes in send and receive mask to registered listeners. */ | 449 | /* Dispatch changes in send and receive mask to registered listeners. */ |