diff mbox

[1/9] powerpc/47x: Guard 47x cputable entries with CONFIG_PPC_47x

Message ID 1502174365-8293-1-git-send-email-mpe@ellerman.id.au (mailing list archive)
State Accepted
Commit 13fef7f9da13ab6cc22d456315e88769bf34a02a
Headers show

Commit Message

Michael Ellerman Aug. 8, 2017, 6:39 a.m. UTC
Currently we build the 47x cputable entries even when CONFIG_PPC_47x is
disabled. That means a kernel built without CONFIG_PPC_47x will claim to
support a 47x CPU and start booting, only to break somewhere later
because it doesn't have 47x support compiled in.

So guard the 47x cputable entries with CONFIG_PPC_47x. Note that this is
inside the #ifdef CONFIG_44x section, because 47x depends on 44x.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/kernel/cputable.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Michael Ellerman Aug. 11, 2017, 12:20 p.m. UTC | #1
On Tue, 2017-08-08 at 06:39:17 UTC, Michael Ellerman wrote:
> Currently we build the 47x cputable entries even when CONFIG_PPC_47x is
> disabled. That means a kernel built without CONFIG_PPC_47x will claim to
> support a 47x CPU and start booting, only to break somewhere later
> because it doesn't have 47x support compiled in.
> 
> So guard the 47x cputable entries with CONFIG_PPC_47x. Note that this is
> inside the #ifdef CONFIG_44x section, because 47x depends on 44x.
> 
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

Series applied to powerpc next.

https://git.kernel.org/powerpc/c/13fef7f9da13ab6cc22d456315e887

cheers
diff mbox

Patch

diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
index 6f849832a669..080bf51e0104 100644
--- a/arch/powerpc/kernel/cputable.c
+++ b/arch/powerpc/kernel/cputable.c
@@ -1936,6 +1936,7 @@  static struct cpu_spec __initdata cpu_specs[] = {
 		.machine_check		= machine_check_440A,
 		.platform		= "ppc440",
 	},
+#ifdef CONFIG_PPC_47x
 	{ /* 476 DD2 core */
 		.pvr_mask		= 0xffffffff,
 		.pvr_value		= 0x11a52080,
@@ -1992,6 +1993,7 @@  static struct cpu_spec __initdata cpu_specs[] = {
 		.machine_check		= machine_check_47x,
 		.platform		= "ppc470",
 	},
+#endif /* CONFIG_PPC_47x */
 	{	/* default match */
 		.pvr_mask		= 0x00000000,
 		.pvr_value		= 0x00000000,