]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
s390/smp: Use monotonic clock in smp_emergency_stop()
authorSven Schnelle <svens@linux.ibm.com>
Thu, 10 Jul 2025 07:43:11 +0000 (09:43 +0200)
committerAlexander Gordeev <agordeev@linux.ibm.com>
Mon, 21 Jul 2025 10:41:55 +0000 (12:41 +0200)
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 <svens@linux.ibm.com>
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
arch/s390/kernel/smp.c

index 6435c5632bc96719b0e13c6b33346a3d1c771d7c..e88ebe5339fc40b1e3a285bd7a8f1178bc2eda52 100644 (file)
@@ -430,16 +430,16 @@ void notrace smp_emergency_stop(void)
        cpumask_copy(&cpumask, cpu_online_mask);
        cpumask_clear_cpu(smp_processor_id(), &cpumask);
 
-       end = get_tod_clock() + (1000000UL << 12);
+       end = get_tod_clock_monotonic() + (1000000UL << 12);
        for_each_cpu(cpu, &cpumask) {
                struct pcpu *pcpu = per_cpu_ptr(&pcpu_devices, cpu);
                set_bit(ec_stop_cpu, &pcpu->ec_mask);
                while (__pcpu_sigp(pcpu->address, SIGP_EMERGENCY_SIGNAL,
                                   0, NULL) == SIGP_CC_BUSY &&
-                      get_tod_clock() < end)
+                      get_tod_clock_monotonic() < end)
                        cpu_relax();
        }
-       while (get_tod_clock() < end) {
+       while (get_tod_clock_monotonic() < end) {
                for_each_cpu(cpu, &cpumask)
                        if (pcpu_stopped(per_cpu_ptr(&pcpu_devices, cpu)))
                                cpumask_clear_cpu(cpu, &cpumask);