All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josip Rodin <joy@entuzijast.net>
To: sparclinux@vger.kernel.org
Subject: Re: Sun4d boot crash in sun4d_init_timers
Date: Tue, 24 May 2011 08:59:50 +0000	[thread overview]
Message-ID: <20110524085949.GA7688@entuzijast.net> (raw)
In-Reply-To: <Pine.LNX.4.64.1105231908050.7984@oizys.tordivel.org>

On Tue, May 24, 2011 at 01:05:14AM +0200, Josip Rodin wrote:
> +	board = of_getintprop_default(dp, "board#", 0);
> +	if (!board) {

> Passing around the 'board' property of 'cpu-unit' looks like it should be done
> because the same thing is used to seed board_to_cpu[].
> 
> http://git.kernel.org/?p=linux/kernel/git/davem/prtconfs.git;a=blob;f=ss1000;hô20dc005d6939b837134d146741316c024d5932;hb=HEAD
> says both cpu-units have the same, zeroth board, but it might not hurt
> to check just in case some other machine happens to use a different index.

In fact it looks like 0 is a common valid value in the analogous pieces of
code that don't even verify the result of that lookup. The above code should
either not check that lookup either (the simple solution), or set the
default to -1 so that it can actually discern error state.

-- 
     2. That which causes joy or happiness.

  parent reply	other threads:[~2011-05-24  8:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-23 17:28 Sun4d boot crash in sun4d_init_timers Kjetil Oftedal
2011-05-23 18:59 ` daniel
2011-05-23 23:05 ` Josip Rodin
2011-05-24  8:59 ` Josip Rodin [this message]
2011-05-24 17:43 ` Kjetil Oftedal
2011-05-27 22:13 ` Tom Callaway

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=20110524085949.GA7688@entuzijast.net \
    --to=joy@entuzijast.net \
    --cc=sparclinux@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.