[PATCH] powerpc/85xx: fix mpic configuration in CAMP mode

STALE5563d

5 messages, 3 authors, 2011-07-22 · open the first message on its own page

[PATCH] powerpc/85xx: fix mpic configuration in CAMP mode

From: Fabio Baltieri <hidden>
Date: 2011-07-10 18:55:34

Change the string to check for CAMP mode boot on MPC85xx (eg. P2020) to match
the one in the corresponding dts files (p2020rdb_camp_core{0,1}.dts).

Without this fix the mpic is configured as in the SMP boot mode, which causes
the first core to report a protected source interrupt error for devices
of the other core and lock up.

Signed-off-by: Fabio Baltieri <redacted>
---
 arch/powerpc/platforms/85xx/mpc85xx_rdb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c
b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c
index 088f30b..a1e5e70 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c
@@ -58,7 +58,7 @@ void __init mpc85xx_rdb_pic_init(void)
 		return;
 	}

-	if (of_flat_dt_is_compatible(root, "fsl,85XXRDB-CAMP")) {
+	if (of_flat_dt_is_compatible(root, "fsl,MPC85XXRDB-CAMP")) {
 		mpic = mpic_alloc(np, r.start,
 			MPIC_PRIMARY |
 			MPIC_BIG_ENDIAN | MPIC_BROKEN_FRR_NIRQS,
-- 
1.7.5.1

Re: [PATCH] powerpc/85xx: fix mpic configuration in CAMP mode

From: Scott Wood <hidden>
Date: 2011-07-11 19:39:19

On Sun, 10 Jul 2011 20:55:32 +0200
Fabio Baltieri [off-list ref] wrote:
quoted hunk
Change the string to check for CAMP mode boot on MPC85xx (eg. P2020) to match
the one in the corresponding dts files (p2020rdb_camp_core{0,1}.dts).

Without this fix the mpic is configured as in the SMP boot mode, which causes
the first core to report a protected source interrupt error for devices
of the other core and lock up.

Signed-off-by: Fabio Baltieri <redacted>
---
 arch/powerpc/platforms/85xx/mpc85xx_rdb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c
b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c
index 088f30b..a1e5e70 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c
@@ -58,7 +58,7 @@ void __init mpc85xx_rdb_pic_init(void)
 		return;
 	}

-	if (of_flat_dt_is_compatible(root, "fsl,85XXRDB-CAMP")) {
+	if (of_flat_dt_is_compatible(root, "fsl,MPC85XXRDB-CAMP")) {
 		mpic = mpic_alloc(np, r.start,
 			MPIC_PRIMARY |
 			MPIC_BIG_ENDIAN | MPIC_BROKEN_FRR_NIRQS,
Shouldn't we be setting MPIC_SINGLE_DEST_CPU in this case (as we do for
the other case)?

Or just drop this and specify pic-no-reset in the mpic node.

-Scott

Re: [PATCH] powerpc/85xx: fix mpic configuration in CAMP mode

From: Fabio Baltieri <hidden>
Date: 2011-07-12 07:38:18

On Mon, Jul 11, 2011 at 9:38 PM, Scott Wood [off-list ref] wrote=
:
On Sun, 10 Jul 2011 20:55:32 +0200
Fabio Baltieri [off-list ref] wrote:
quoted
Change the string to check for CAMP mode boot on MPC85xx (eg. P2020) to =
match
quoted
the one in the corresponding dts files (p2020rdb_camp_core{0,1}.dts).

Without this fix the mpic is configured as in the SMP boot mode, which c=
auses
quoted
the first core to report a protected source interrupt error for devices
of the other core and lock up.

Signed-off-by: Fabio Baltieri <redacted>
---
=A0arch/powerpc/platforms/85xx/mpc85xx_rdb.c | =A0 =A02 +-
=A01 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c
b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c
index 088f30b..a1e5e70 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c
@@ -58,7 +58,7 @@ void __init mpc85xx_rdb_pic_init(void)
=A0 =A0 =A0 =A0 =A0 =A0 =A0 return;
=A0 =A0 =A0 }

- =A0 =A0 if (of_flat_dt_is_compatible(root, "fsl,85XXRDB-CAMP")) {
+ =A0 =A0 if (of_flat_dt_is_compatible(root, "fsl,MPC85XXRDB-CAMP")) {
=A0 =A0 =A0 =A0 =A0 =A0 =A0 mpic =3D mpic_alloc(np, r.start,
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 MPIC_PRIMARY |
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 MPIC_BIG_ENDIAN | MPIC_BROKE=
N_FRR_NIRQS,
Shouldn't we be setting MPIC_SINGLE_DEST_CPU in this case (as we do for
the other case)?

Or just drop this and specify pic-no-reset in the mpic node.
Yeah, seems like a good idea. I still prefer to leave the
MPIC_WANTS_RESET for the default case (SMP mode), which I think is
what most people are using.

I'm sending a v2 of the patch, thanks!

--=20
Fabio Baltieri

[PATCH v2] powerpc/85xx: fix mpic configuration in CAMP mode

From: Fabio Baltieri <hidden>
Date: 2011-07-12 07:48:00

Change the string to check for CAMP mode boot on MPC85xx (eg. P2020) to match
the one in the corresponding dts files (p2020rdb_camp_core{0,1}.dts).

Without this fix the mpic is configured as in the SMP boot mode, which causes
the first core to report a protected source interrupt error for devices
of the other core and lock up.

Also add MPIC_SINGLE_DEST_CPU on both P2020 based architectures in CAMP
mode as suggested by Scott Wood. Thanks.

Cc: Scott Wood <redacted>
Cc: Poonam Aggrwal <redacted>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Fabio Baltieri <redacted>
---
 arch/powerpc/platforms/85xx/mpc85xx_ds.c  |    3 ++-
 arch/powerpc/platforms/85xx/mpc85xx_rdb.c |    5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platforms/85xx/mpc85xx_ds.c
index c7b97f7..1b9a8cf 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c
@@ -83,7 +83,8 @@ void __init mpc85xx_ds_pic_init(void)
 	if (of_flat_dt_is_compatible(root, "fsl,MPC8572DS-CAMP")) {
 		mpic = mpic_alloc(np, r.start,
 			MPIC_PRIMARY |
-			MPIC_BIG_ENDIAN | MPIC_BROKEN_FRR_NIRQS,
+			MPIC_BIG_ENDIAN | MPIC_BROKEN_FRR_NIRQS |
+			MPIC_SINGLE_DEST_CPU,
 			0, 256, " OpenPIC  ");
 	} else {
 		mpic = mpic_alloc(np, r.start,
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c
index 088f30b..f5ff911 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c
@@ -58,10 +58,11 @@ void __init mpc85xx_rdb_pic_init(void)
 		return;
 	}
 
-	if (of_flat_dt_is_compatible(root, "fsl,85XXRDB-CAMP")) {
+	if (of_flat_dt_is_compatible(root, "fsl,MPC85XXRDB-CAMP")) {
 		mpic = mpic_alloc(np, r.start,
 			MPIC_PRIMARY |
-			MPIC_BIG_ENDIAN | MPIC_BROKEN_FRR_NIRQS,
+			MPIC_BIG_ENDIAN | MPIC_BROKEN_FRR_NIRQS |
+			MPIC_SINGLE_DEST_CPU,
 			0, 256, " OpenPIC  ");
 	} else {
 		mpic = mpic_alloc(np, r.start,
-- 
1.7.5.1

Re: [PATCH v2] powerpc/85xx: fix mpic configuration in CAMP mode

From: Kumar Gala <hidden>
Date: 2011-07-22 08:29:19

On Jul 12, 2011, at 2:49 AM, Fabio Baltieri wrote:
Change the string to check for CAMP mode boot on MPC85xx (eg. P2020) =
to match
the one in the corresponding dts files (p2020rdb_camp_core{0,1}.dts).
=20
Without this fix the mpic is configured as in the SMP boot mode, which =
causes
the first core to report a protected source interrupt error for =
devices
of the other core and lock up.
=20
Also add MPIC_SINGLE_DEST_CPU on both P2020 based architectures in =
CAMP
mode as suggested by Scott Wood. Thanks.
=20
Cc: Scott Wood <redacted>
Cc: Poonam Aggrwal <redacted>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Fabio Baltieri <redacted>
---
arch/powerpc/platforms/85xx/mpc85xx_ds.c  |    3 ++-
arch/powerpc/platforms/85xx/mpc85xx_rdb.c |    5 +++--
2 files changed, 5 insertions(+), 3 deletions(-)
applied to next

- k=
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help