linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Josh Boyer <jwboyer@linux.vnet.ibm.com>
To: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Cc: linuxppc-dev list <Linuxppc-dev@ozlabs.org>,
	Torez Smith <torez@us.ibm.com>
Subject: Re: [PATCH 06/13] powerpc/4xx: Simple platform for the ISS 4xx simulator
Date: Wed, 5 May 2010 11:11:20 -0400	[thread overview]
Message-ID: <20100505151120.GJ29593@zod.rchland.ibm.com> (raw)
In-Reply-To: <20100305204329.18424.26544.sendpatchset@norville.austin.ibm.com>

On Fri, Mar 05, 2010 at 01:45:54PM -0700, Dave Kleikamp wrote:
>+config ISS4xx
>+	bool "ISS 4xx Simulator"
>+	depends on (44x || 40x)
>+	default n
>+	select 405GP if 40x
>+	select 440GP if 44x && !PPC_47x
>+	select PPC_FPU
>+	select OF_RTC
>+	help
>+	  This option enables support for the IBM ISS simulation environment

This looks like how we want to do this, however...

>+/* We can have either UICs or MPICs */
>+static void __init iss4xx_init_irq(void)
>+{
>+	struct device_node *np;
>+
>+	/* Find top level interrupt controller */
>+	for_each_node_with_property(np, "interrupt-controller") {
>+		if (of_get_property(np, "interrupts", NULL) == NULL)
>+			break;
>+	}
>+	if (np == NULL)
>+		panic("Can't find top level interrupt controller");
>+
>+	/* Check type and do appropriate initialization */
>+	if (of_device_is_compatible(np, "ibm,uic")) {
>+		uic_init_tree();
>+		ppc_md.get_irq = uic_get_irq;
>+	} else if (of_device_is_compatible(np, "chrp,open-pic")) {
>+		/* The MPIC driver will get everything it needs from the
>+		 * device-tree, just pass 0 to all arguments
>+		 */
>+		struct mpic *mpic = mpic_alloc(np, 0, MPIC_PRIMARY, 0, 0,
>+					       " MPIC     ");
>+		BUG_ON(mpic == NULL);
>+		mpic_init(mpic);
>+		ppc_md.get_irq = mpic_get_irq;
>+	} else
>+		panic("Unrecognized top level interrupt controller");
>+}

.. on non-476 builds we get link errors:

arch/powerpc/platforms/built-in.o: In function `as1_writeb':
(.init.text+0x5d4): undefined reference to `mpic_alloc'
arch/powerpc/platforms/built-in.o: In function `as1_writeb':
(.init.text+0x5e4): undefined reference to `mpic_init'
arch/powerpc/platforms/built-in.o: In function `as1_writeb':
(.init.text+0x5ea): undefined reference to `mpic_get_irq'
arch/powerpc/platforms/built-in.o: In function `as1_writeb':
(.init.text+0x5ee): undefined reference to `mpic_get_irq'
make: *** [.tmp_vmlinux1] Error 1

because we don't have CONFIG_MPIC turned on for these.  I'd suggest we guard
the mpic else chunk in this file behind CONFIG_MPIC.  Agreed?

I'm less worried about the mpic references that are already guarded behind the
CONFIG_SMP sections.  Nobody has been crazy enough to make an SMP 440 or 460 SoC
yet, so CONFIG_SMP should only get selected for 476, and that already selects
MPIC in the Kconfig.

josh

  reply	other threads:[~2010-05-05 15:11 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-05 20:42 [PATCH 00/13] powerpc/47x: Support for 476 core - Version 2 Dave Kleikamp
2010-03-05 13:43 ` [PATCH 04/13] powerpc/476: add machine check handler for 47x core Dave Kleikamp
2010-05-05 12:27   ` Josh Boyer
2010-05-05 12:59     ` Josh Boyer
2010-05-05 13:05       ` Dave Kleikamp
2010-03-05 20:43 ` [PATCH 01/13] powerpc/booke: Add Stack Marking support to Booke Exception Prolog Dave Kleikamp
2010-03-05 20:43 ` [PATCH 02/13] powerpc/44x: break out cpu init code into stand-alone function Dave Kleikamp
2010-03-05 20:43 ` [PATCH 03/13] powerpc/47x: Base ppc476 support Dave Kleikamp
2010-03-05 20:43 ` [PATCH 05/13] powerpc/476: Add isync after loading mmu and debug spr's Dave Kleikamp
2010-03-07 23:08   ` Hollis Blanchard
2010-03-10 21:09     ` Dave Kleikamp
2010-03-05 20:43 ` [PATCH 07/13] powerpc/47x: defconfig for 476 on the iss 4xx simulator Dave Kleikamp
2010-03-05 20:43 ` [PATCH 08/13] powerpc/476: define specific cpu table entry DD1.1 core Dave Kleikamp
2010-03-05 20:43 ` [PATCH 09/13] powerpc/476: Workaround for dcbf/dcbz workaround on DD1 Dave Kleikamp
2010-03-05 20:43 ` [PATCH 10/13] powerpc/476: Add isync to the top of all exception handlers for DD1.1 core Dave Kleikamp
2010-03-05 20:43 ` [PATCH 11/13] powerpc/476: Software workaround to fix dcr read/write sequencing Dave Kleikamp
2010-03-05 20:44 ` [PATCH 12/13] powerpc/476: Workaround for DD1.1: Issue lwsync after mtpid Dave Kleikamp
2010-03-05 20:44 ` [PATCH 13/13] powerpc/476: Add dci instruction to async interrupt handlers on DD1 core Dave Kleikamp
2010-03-05 20:45 ` [PATCH 06/13] powerpc/4xx: Simple platform for the ISS 4xx simulator Dave Kleikamp
2010-05-05 15:11   ` Josh Boyer [this message]
2010-05-05 15:16     ` Dave Kleikamp

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=20100505151120.GJ29593@zod.rchland.ibm.com \
    --to=jwboyer@linux.vnet.ibm.com \
    --cc=Linuxppc-dev@ozlabs.org \
    --cc=shaggy@linux.vnet.ibm.com \
    --cc=torez@us.ibm.com \
    /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).