All of lore.kernel.org
 help / color / mirror / Atom feed
* FAILED: patch "[PATCH] Revert "parisc: Mark sched_clock unstable only if clocks are" failed to apply to 5.15-stable tree
@ 2022-05-09  8:09 gregkh
  2022-05-09 16:20 ` Helge Deller
  0 siblings, 1 reply; 3+ messages in thread
From: gregkh @ 2022-05-09  8:09 UTC (permalink / raw)
  To: deller, dave.anglin; +Cc: stable


The patch below does not apply to the 5.15-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 7962c0896429af2a0e00ec6bc15d992536453b2d Mon Sep 17 00:00:00 2001
From: Helge Deller <deller@gmx.de>
Date: Sat, 7 May 2022 15:32:38 +0200
Subject: [PATCH] Revert "parisc: Mark sched_clock unstable only if clocks are
 not syncronized"

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+

diff --git a/arch/parisc/kernel/setup.c b/arch/parisc/kernel/setup.c
index b91cb45ffd4e..f005ddedb50e 100644
--- a/arch/parisc/kernel/setup.c
+++ b/arch/parisc/kernel/setup.c
@@ -161,6 +161,8 @@ void __init setup_arch(char **cmdline_p)
 #ifdef CONFIG_PA11
 	dma_ops_init();
 #endif
+
+	clear_sched_clock_stable();
 }
 
 /*
diff --git a/arch/parisc/kernel/time.c b/arch/parisc/kernel/time.c
index 95ee9e1a364b..19c31a72fe76 100644
--- a/arch/parisc/kernel/time.c
+++ b/arch/parisc/kernel/time.c
@@ -267,9 +267,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;
@@ -277,6 +274,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);


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: FAILED: patch "[PATCH] Revert "parisc: Mark sched_clock unstable only if clocks are" failed to apply to 5.15-stable tree
  2022-05-09  8:09 FAILED: patch "[PATCH] Revert "parisc: Mark sched_clock unstable only if clocks are" failed to apply to 5.15-stable tree gregkh
@ 2022-05-09 16:20 ` Helge Deller
  2022-05-10 10:28   ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Helge Deller @ 2022-05-09 16:20 UTC (permalink / raw)
  To: gregkh; +Cc: deller, dave.anglin, stable

Hi Greg,

* gregkh@linuxfoundation.org <gregkh@linuxfoundation.org>:
>
> The patch below does not apply to the 5.15-stable tree.
> If someone wants it applied there, or to any other stable or longterm
> tree, then please email the backport, including the original git commit
> id to <stable@vger.kernel.org>.

Please apply below patch instead to v5.15-stable.

Thanks!
Helge


From 7dacfca67135dc703df89d273553d8f5259776ce Mon Sep 17 00:00:00 2001
From: Helge Deller <deller@gmx.de>
Date: Mon, 9 May 2022 18:13:29 +0200
Subject: [PATCH] Revert "parisc: Mark sched_clock unstable only if clocks are
 not syncronized"

This backport reverts clock changes which made the Linux internal clock
unreliable on 32- and 64-bit SMP kernels.
This patch brings the clock code in sync with upstream v5.18-rc6.

Signed-off-by: Helge Deller <deller@gmx.de>
Noticed-by: John David Anglin <dave.anglin@bell.net>

diff --git a/arch/parisc/kernel/setup.c b/arch/parisc/kernel/setup.c
index cceb09855e03..3fb86ee507dd 100644
--- a/arch/parisc/kernel/setup.c
+++ b/arch/parisc/kernel/setup.c
@@ -150,6 +150,8 @@ void __init setup_arch(char **cmdline_p)
 #ifdef CONFIG_PA11
 	dma_ops_init();
 #endif
+
+	clear_sched_clock_stable();
 }

 /*
diff --git a/arch/parisc/kernel/time.c b/arch/parisc/kernel/time.c
index 061119a56fbe..d8e59a1000ab 100644
--- a/arch/parisc/kernel/time.c
+++ b/arch/parisc/kernel/time.c
@@ -249,13 +249,9 @@ void __init time_init(void)
 static int __init init_cr16_clocksource(void)
 {
 	/*
-	 * The cr16 interval timers are not syncronized across CPUs, even if
-	 * they share the same socket.
+	 * The cr16 interval timers are not synchronized across CPUs.
 	 */
 	if (num_online_cpus() > 1 && !running_on_qemu) {
-		/* mark sched_clock unstable */
-		clear_sched_clock_stable();
-
 		clocksource_cr16.name = "cr16_unstable";
 		clocksource_cr16.flags = CLOCK_SOURCE_UNSTABLE;
 		clocksource_cr16.rating = 0;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: FAILED: patch "[PATCH] Revert "parisc: Mark sched_clock unstable only if clocks are" failed to apply to 5.15-stable tree
  2022-05-09 16:20 ` Helge Deller
@ 2022-05-10 10:28   ` Greg KH
  0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2022-05-10 10:28 UTC (permalink / raw)
  To: Helge Deller; +Cc: dave.anglin, stable

On Mon, May 09, 2022 at 06:20:38PM +0200, Helge Deller wrote:
> Hi Greg,
> 
> * gregkh@linuxfoundation.org <gregkh@linuxfoundation.org>:
> >
> > The patch below does not apply to the 5.15-stable tree.
> > If someone wants it applied there, or to any other stable or longterm
> > tree, then please email the backport, including the original git commit
> > id to <stable@vger.kernel.org>.
> 
> Please apply below patch instead to v5.15-stable.

Now applied, thanks.

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-05-10 10:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-09  8:09 FAILED: patch "[PATCH] Revert "parisc: Mark sched_clock unstable only if clocks are" failed to apply to 5.15-stable tree gregkh
2022-05-09 16:20 ` Helge Deller
2022-05-10 10:28   ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.