Skip to content

Commit b367017

Browse files
svens-s390Alexander Gordeev
authored andcommitted
s390/stp: Remove udelay from stp_sync_clock()
When an stp sync check is handled on a system with multiple cpus each cpu gets a machine check but only the first one actually handles the sync operation. All other CPUs spin waiting for the first one to finish with a short udelay(). But udelay can't be used here as the first CPU modifies tod_clock_base before performing the sync op. During this timeframe get_tod_clock_monotonic() might return a non-monotonic time. The time spent waiting should be very short and udelay is a busy loop anyways, therefore simply remove the udelay. Reviewed-by: Heiko Carstens <[email protected]> Signed-off-by: Sven Schnelle <[email protected]> Signed-off-by: Alexander Gordeev <[email protected]>
1 parent 7cf636c commit b367017

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/s390/kernel/time.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ static int stp_sync_clock(void *data)
580580
atomic_dec(&sync->cpus);
581581
/* Wait for in_sync to be set. */
582582
while (READ_ONCE(sync->in_sync) == 0)
583-
__udelay(1);
583+
;
584584
}
585585
if (sync->in_sync != 1)
586586
/* Didn't work. Clear per-cpu in sync bit again. */

0 commit comments

Comments
 (0)