linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv2 for soc 4/4] arm: socfpga: Add SMP support for actual socfpga harware
Date: Fri, 1 Feb 2013 15:31:52 +0000	[thread overview]
Message-ID: <20130201153152.GS23505@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <71B37E0559AC6849A68C5BA94C509FB45A63D4E47D@SJ-ITMSG02.altera.priv.altera.com>

On Fri, Feb 01, 2013 at 07:27:46AM -0800, Dinh Nguyen wrote:
> Hi Olof,
> On Fri, 2013-02-01 at 11:46 +0100, ZY - pavel wrote:
> > Hi!
> >
> > > > Because the CPU1 start address is different for socfpga-vt and
> > > > socfpga-cyclone5, we add code to use the correct CPU1 start addr.
> >
> > > > @@ -72,6 +73,13 @@ void __init socfpga_sysmgr_init(void)
> > > >   struct device_node *np;
> > > >
> > > >   np = of_find_compatible_node(NULL, NULL, "altr,sys-mgr");
> > > > +
> > > > + if (of_property_read_u32(np, "cpu1-start-addr",
> > > > +                 (u32 *) &cpu1start_addr)) {
> > > > +         early_printk("Need cpu1-start-addr in device tree.\n");
> > > > +         panic("Need cpu1-start-addr in device tree.\n");
> > > > + }
> > > > +
> > > >   sys_manager_base_addr = of_iomap(np, 0);
> > >
> > > Wouldn't it be easier to diagnose this failure if you just printed the error
> > > and continued booting without the second CPU? An early panic is usually really
> > > hard to debug since you might not get early console without extra work.
> >
> > I actually thought about that... but could not think of non-ugly way
> > of doing that. I hope dts will normally be "right" for any production
> > system...
> 
> I think a panic is better just for the reason that if someone is
> expecting SMP, but missed the warning message, and later finds out that
> the secondary core never came up, it would save some debugging time.
> 
> Since I have to send out a v3 from the 1st patch anyways, let me verify
> that I can get the early warning.

The choice is between a panic() at a point where the only way to find
out is to throw in printascii() or a working printk, and ending up with
an unbootable kernel, vs continuing the boot and having an almost
working system which can be logged into and the messages viewed.

If you have an application which relies on the second CPU coming up,
why not have it verify that the second CPU came up (it's quite easy
to do - there's POSIX standard libc calls to get the number of online
CPUs).

  reply	other threads:[~2013-02-01 15:31 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-31 17:05 [PATCHv2 for soc 0/4] Enabling socfpga on hardware dinguyen at altera.com
2013-01-31 17:05 ` [PATCHv2 for soc 1/4] arm: socfpga: Add new device tree source for actual socfpga HW dinguyen at altera.com
2013-02-01  3:46   ` Olof Johansson
2013-02-01 15:23     ` Dinh Nguyen
2013-01-31 17:05 ` [PATCHv2 for soc 2/4] arm: socfpga: Add entries to enable make dtbs socfpga dinguyen at altera.com
2013-01-31 17:05 ` [PATCHv2 for soc 3/4] arm: Add v7_invalidate_l1 to cache-v7.S dinguyen at altera.com
2013-01-31 18:11   ` Stephen Warren
2013-02-01  3:47   ` Olof Johansson
2013-02-01 11:29   ` Santosh Shilimkar
2013-02-01 11:32     ` Russell King - ARM Linux
2013-02-01 11:44       ` Santosh Shilimkar
2013-02-01 12:48         ` Russell King - ARM Linux
2013-02-01 13:04           ` Santosh Shilimkar
2013-02-01 13:20             ` Russell King - ARM Linux
2013-02-01 14:09               ` Santosh Shilimkar
2013-02-01 12:11     ` Lorenzo Pieralisi
2013-02-01 12:24       ` Santosh Shilimkar
2013-02-01 12:54       ` Russell King - ARM Linux
2013-02-01 14:10         ` Lorenzo Pieralisi
2013-02-01 14:19           ` Russell King - ARM Linux
2013-02-01 14:31             ` Russell King - ARM Linux
2013-02-01 14:43               ` Santosh Shilimkar
2013-02-01 14:49                 ` Russell King - ARM Linux
2013-02-01 14:53                   ` Santosh Shilimkar
2013-02-01 14:34             ` Lorenzo Pieralisi
2013-01-31 17:05 ` [PATCHv2 for soc 4/4] arm: socfpga: Add SMP support for actual socfpga harware dinguyen at altera.com
2013-02-01  3:50   ` Olof Johansson
2013-02-01 10:46     ` Pavel Machek
2013-02-01 15:27       ` Dinh Nguyen
2013-02-01 15:31         ` Russell King - ARM Linux [this message]
2013-02-01 16:39           ` Dinh Nguyen
2013-02-02 19:24             ` Pavel Machek
2013-02-02 21:37               ` Dinh Nguyen
2013-02-03 18:36                 ` Pavel Machek
2013-02-04 16:12                   ` Dinh Nguyen
2013-02-01 10:50   ` Pavel Machek

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=20130201153152.GS23505@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.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).