Commit f3dfa86c authored by Michael Holzheu's avatar Michael Holzheu Committed by Martin Schwidefsky

[S390] Use del_timer instead of del_timer_sync

When syncing the sclp console queue, we call del_timer_sync() while holding
the "sclp_con_lock" spinlock. This lock is also taken in the timer function
"sclp_console_timeout". Therefore the sync version of del_timer() cannot be
used here. Because the synchronous deletion of the timer is only needed
in the suspend callback and in that case only one CPU is remaining and
therefore it is not possible that the timer function is running in parallel,
we can safely use del_timer() instead of del_timer_sync().
Signed-off-by: default avatarMichael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 66d51f3e
...@@ -109,7 +109,7 @@ static void sclp_console_sync_queue(void) ...@@ -109,7 +109,7 @@ static void sclp_console_sync_queue(void)
spin_lock_irqsave(&sclp_con_lock, flags); spin_lock_irqsave(&sclp_con_lock, flags);
if (timer_pending(&sclp_con_timer)) if (timer_pending(&sclp_con_timer))
del_timer_sync(&sclp_con_timer); del_timer(&sclp_con_timer);
while (sclp_con_queue_running) { while (sclp_con_queue_running) {
spin_unlock_irqrestore(&sclp_con_lock, flags); spin_unlock_irqrestore(&sclp_con_lock, flags);
sclp_sync_wait(); sclp_sync_wait();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment