linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: linuxppc-dev@ozlabs.org
Subject: [RFC PATCH 1/9] powerpc/47x: Guard 47x cputable entries with CONFIG_PPC_47x
Date: Fri, 17 Feb 2017 17:32:11 +1100	[thread overview]
Message-ID: <1487313139-21959-1-git-send-email-mpe@ellerman.id.au> (raw)

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(+)

diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
index 6a82ef039c50..3b8c89a69732 100644
--- a/arch/powerpc/kernel/cputable.c
+++ b/arch/powerpc/kernel/cputable.c
@@ -1913,6 +1913,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,
@@ -1969,6 +1970,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,
-- 
2.7.4

             reply	other threads:[~2017-02-17  6:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-17  6:32 Michael Ellerman [this message]
2017-02-17  6:32 ` [RFC PATCH 2/9] powerpc/44x: Simplify CONFIG_44x checks in Makefile Michael Ellerman
2017-02-17  6:32 ` [RFC PATCH 3/9] powerpc/44x: Move 44x machine check handlers into platforms/44x Michael Ellerman
2017-02-17  6:32 ` [RFC PATCH 4/9] powerpc/4xx: Create 4xx pseudo-platform in platforms/4xx Michael Ellerman
2017-02-20  2:34   ` Nicholas Piggin
2017-02-21 20:26     ` Arnd Bergmann
2017-02-17  6:32 ` [RFC PATCH 5/9] powerpc/4xx: Move machine_check_4xx() into platforms/4xx Michael Ellerman
2017-03-02 11:11   ` Christophe LEROY
2017-02-17  6:32 ` [RFC PATCH 6/9] powerpc/traps: Inline get_mc_reason() Michael Ellerman
2017-02-17  6:32 ` [RFC PATCH 7/9] powerpc/traps: machine_check_generic() is only used on 32-bit Michael Ellerman
2017-02-17  6:32 ` [RFC PATCH 8/9] powerpc/mce: Move 64-bit machine check code into mce.c Michael Ellerman
2017-02-17  6:32 ` [RFC PATCH 9/9] powerpc/traps: Use SRR1 defines for program check reasons Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1487313139-21959-1-git-send-email-mpe@ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).