Patchwork [precise] powerpc/pmac: Fix SMP kernels on pre-core99 UP machines

login
register
mail settings
Submitter Jeremy Kerr
Date March 20, 2012, 7:27 a.m.
Message ID <1332228453.147584.181533989908.1.gpush@pecola>
Download mbox | patch
Permalink /patch/147749/
State New
Headers show

Comments

Jeremy Kerr - March 20, 2012, 7:27 a.m.
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>

BugLink: https://bugs.launchpad.net/bugs/959959

The code for "powersurge" SMP would kick in and cause a crash
at boot due to the lack of a NULL test.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
Reported-By: Adam Conrad <adconrad@ubuntu.com>
Tested-By: Adam Conrad <adconrad@ubuntu.com>

Cherry-picked from upstream commit
78c5c68a4cf4329d17abfa469345ddf323d4fd62

---
 arch/powerpc/platforms/powermac/smp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Anca Emanuel - March 20, 2012, 8:37 a.m.
On Tue, Mar 20, 2012 at 9:27 AM, Jeremy Kerr <jeremy.kerr@canonical.com> wrote:
> From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>
> BugLink: https://bugs.launchpad.net/bugs/959959
>
> The code for "powersurge" SMP would kick in and cause a crash
> at boot due to the lack of a NULL test.
>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
> Reported-By: Adam Conrad <adconrad@ubuntu.com>
> Tested-By: Adam Conrad <adconrad@ubuntu.com>
>
> Cherry-picked from upstream commit
> 78c5c68a4cf4329d17abfa469345ddf323d4fd62
>
> ---
>  arch/powerpc/platforms/powermac/smp.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c
> index 9b6a820..3394254 100644
> --- a/arch/powerpc/platforms/powermac/smp.c
> +++ b/arch/powerpc/platforms/powermac/smp.c
> @@ -414,7 +414,7 @@ static struct irqaction psurge_irqaction = {
>
>  static void __init smp_psurge_setup_cpu(int cpu_nr)
>  {
> -       if (cpu_nr != 0)
> +       if (cpu_nr != 0 || !psurge_start)
>                return;
>
>        /* reset the entry point so if we get another intr we won't
>
> --
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team

Why not CC: lkml ?

It is on the stable channel ? Upstream link please ?
Now you understand Greg's concerns about maintaining a stable kernel ?
Jeremy Kerr - March 20, 2012, 8:38 a.m.
Hi Anca,

> Why not CC: lkml ?


Because it's already in mainline. Refer:

 > Cherry-picked from upstream commit
 > 78c5c68a4cf4329d17abfa469345ddf323d4fd62

  

Cheers,


Jeremy
Leann Ogasawara - March 20, 2012, 1:32 p.m.
Applied to Precise master-next.

Thanks,
Leann

On Tue, 2012-03-20 at 15:27 +0800, Jeremy Kerr wrote:
> From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> 
> BugLink: https://bugs.launchpad.net/bugs/959959
> 
> The code for "powersurge" SMP would kick in and cause a crash
> at boot due to the lack of a NULL test.
> 
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
> Reported-By: Adam Conrad <adconrad@ubuntu.com>
> Tested-By: Adam Conrad <adconrad@ubuntu.com>
> 
> Cherry-picked from upstream commit
> 78c5c68a4cf4329d17abfa469345ddf323d4fd62
> 
> ---
>  arch/powerpc/platforms/powermac/smp.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c
> index 9b6a820..3394254 100644
> --- a/arch/powerpc/platforms/powermac/smp.c
> +++ b/arch/powerpc/platforms/powermac/smp.c
> @@ -414,7 +414,7 @@ static struct irqaction psurge_irqaction = {
>  
>  static void __init smp_psurge_setup_cpu(int cpu_nr)
>  {
> -	if (cpu_nr != 0)
> +	if (cpu_nr != 0 || !psurge_start)
>  		return;
>  
>  	/* reset the entry point so if we get another intr we won't
>

Patch

diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c
index 9b6a820..3394254 100644
--- a/arch/powerpc/platforms/powermac/smp.c
+++ b/arch/powerpc/platforms/powermac/smp.c
@@ -414,7 +414,7 @@  static struct irqaction psurge_irqaction = {
 
 static void __init smp_psurge_setup_cpu(int cpu_nr)
 {
-	if (cpu_nr != 0)
+	if (cpu_nr != 0 || !psurge_start)
 		return;
 
 	/* reset the entry point so if we get another intr we won't