Revert "parisc: Mark sched_clock unstable only if clocks are not syncronized"
authorHelge Deller <deller@gmx.de>
Sat, 7 May 2022 13:32:38 +0000 (15:32 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 May 2022 10:32:15 +0000 (12:32 +0200)
commit 7962c0896429af2a0e00ec6bc15d992536453b2d upstream.

This reverts commit d97180ad68bdb7ee10f327205a649bc2f558741d.

It triggers RCU stalls at boot with a 32-bit kernel.

Signed-off-by: Helge Deller <deller@gmx.de>
Noticed-by: John David Anglin <dave.anglin@bell.net>
Cc: stable@vger.kernel.org # v5.15+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/parisc/kernel/setup.c
arch/parisc/kernel/time.c

index b91cb45ffd4e3eaf4afee92c2f60efbc92f2f8e3..f005ddedb50e469653bcec1d5eb10c062a414311 100644 (file)
@@ -161,6 +161,8 @@ void __init setup_arch(char **cmdline_p)
 #ifdef CONFIG_PA11
        dma_ops_init();
 #endif
+
+       clear_sched_clock_stable();
 }
 
 /*
index 9fb1e794831b0eb1db779c220041e04b964c883c..08e4d480abe184620cb54c09965c3ddb35d02ed1 100644 (file)
@@ -265,9 +265,6 @@ static int __init init_cr16_clocksource(void)
                            (cpu0_loc == per_cpu(cpu_data, cpu).cpu_loc))
                                continue;
 
-                       /* mark sched_clock unstable */
-                       clear_sched_clock_stable();
-
                        clocksource_cr16.name = "cr16_unstable";
                        clocksource_cr16.flags = CLOCK_SOURCE_UNSTABLE;
                        clocksource_cr16.rating = 0;
@@ -275,6 +272,10 @@ static int __init init_cr16_clocksource(void)
                }
        }
 
+       /* XXX: We may want to mark sched_clock stable here if cr16 clocks are
+        *      in sync:
+        *      (clocksource_cr16.flags == CLOCK_SOURCE_IS_CONTINUOUS) */
+
        /* register at clocksource framework */
        clocksource_register_hz(&clocksource_cr16,
                100 * PAGE0->mem_10msec);