From: Tony Breeds <tony@bakeyournoodle.com>
To: Joel Schopp <jschopp@austin.ibm.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCHv2 2/2] Update ibm,client-architecture call field based on device tree
Date: Tue, 2 Feb 2010 14:48:32 +1100 [thread overview]
Message-ID: <20100202034832.GD12389@ozlabs.org> (raw)
In-Reply-To: <1265064662.5391.19.camel@jschopp-laptop>
On Mon, Feb 01, 2010 at 04:51:02PM -0600, Joel Schopp wrote:
> static void __init prom_send_capabilities(void)
> {
> ihandle elfloader, root;
> prom_arg_t ret;
> + u32 *cores;
>
> root = call_prom("open", 1, 1, ADDR("/"));
> if (root != 0) {
> + /*
> + * If you add to the struct, please be sure the 100 index
> + * didn't change. The BUILD_BUG_ON is a reminder.
> + */
> + cores = (u32 *) &ibm_architecture_vec[100];
> + if(*cores != NR_CPUS)
> + prom_printf("client-architecture structure corrupted\n");
> + *cores = (NR_CPUS / prom_smt_way());
> + prom_printf("setting client-architecture cores to %x\n", *cores);
I don't know if I'm painting a bike shed of if this is a real concern, but if
*cores isn't NR_CPUS shouldn't we do nothing rather then clobbering it?
Yours Tony
next prev parent reply other threads:[~2010-02-02 3:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-14 20:38 [PATCH 0/2] Add max CPU nodes field to ibm,client-architecture call Joel Schopp
2010-01-14 20:40 ` [PATCH 1/2] Add static fields " Joel Schopp
2010-01-14 23:01 ` Joel Schopp
2010-01-15 2:51 ` Benjamin Herrenschmidt
2010-01-15 2:52 ` Benjamin Herrenschmidt
2010-02-01 22:50 ` [PATCHv2 " Joel Schopp
2010-01-14 20:41 ` [PATCH 2/2] Update ibm,client-architecture call field based on device tree Joel Schopp
2010-01-15 2:58 ` Benjamin Herrenschmidt
2010-02-01 22:51 ` [PATCHv2 " Joel Schopp
2010-02-02 3:48 ` Tony Breeds [this message]
2010-02-02 18:37 ` Joel Schopp
2010-02-04 3:27 ` Benjamin Herrenschmidt
2010-02-01 22:50 ` [PATCHv2 0/2] Add max CPU nodes field to ibm,client-architecture call Joel Schopp
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=20100202034832.GD12389@ozlabs.org \
--to=tony@bakeyournoodle.com \
--cc=jschopp@austin.ibm.com \
--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 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.