Skip to content

Commit e12570c

Browse files
svens-s390Alexander Gordeev
authored andcommitted
s390/smp: Use monotonic clock in smp_emergency_stop()
This is a cosmetic change because when in smp_emergency_stop() the system is going to die anyway. But still change the code to use get_tod_clock_monotonic() to prevent people from copying broken code. Signed-off-by: Sven Schnelle <[email protected]> Reviewed-by: Heiko Carstens <[email protected]> Signed-off-by: Alexander Gordeev <[email protected]>
1 parent 09e7e29 commit e12570c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arch/s390/kernel/smp.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -430,16 +430,16 @@ void notrace smp_emergency_stop(void)
430430
cpumask_copy(&cpumask, cpu_online_mask);
431431
cpumask_clear_cpu(smp_processor_id(), &cpumask);
432432

433-
end = get_tod_clock() + (1000000UL << 12);
433+
end = get_tod_clock_monotonic() + (1000000UL << 12);
434434
for_each_cpu(cpu, &cpumask) {
435435
struct pcpu *pcpu = per_cpu_ptr(&pcpu_devices, cpu);
436436
set_bit(ec_stop_cpu, &pcpu->ec_mask);
437437
while (__pcpu_sigp(pcpu->address, SIGP_EMERGENCY_SIGNAL,
438438
0, NULL) == SIGP_CC_BUSY &&
439-
get_tod_clock() < end)
439+
get_tod_clock_monotonic() < end)
440440
cpu_relax();
441441
}
442-
while (get_tod_clock() < end) {
442+
while (get_tod_clock_monotonic() < end) {
443443
for_each_cpu(cpu, &cpumask)
444444
if (pcpu_stopped(per_cpu_ptr(&pcpu_devices, cpu)))
445445
cpumask_clear_cpu(cpu, &cpumask);

0 commit comments

Comments
 (0)