From: Giuliano Pochini <pochini@shiny.it>
To: Russell King <rmk+lkml@arm.linux.org.uk>
Cc: suresh.b.siddha@intel.com, heiko.carstens@de.ibm.com,
linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org,
pochini@denise.shiny.it
Subject: Re: /sys/devices/system/cpu/cpuX/online are missing
Date: Thu, 15 Mar 2007 00:30:20 +0100 [thread overview]
Message-ID: <20070315003020.250097b1.pochini@shiny.it> (raw)
In-Reply-To: <20070313095652.GB20518@flint.arm.linux.org.uk>
On Tue, 13 Mar 2007 09:56:52 +0000
Russell King <rmk+lkml@arm.linux.org.uk> wrote:
> Right, here's the ARM fix which is now in the ARM tree:
> [...]
The following patch seems to fix the issue (+ minor style fix). I'm not sure
it's ok due to my poor knowledge of this code.
Signed-off-by: Giuliano Pochini <pochini@shiny.it>
--- linux-2.6.21rc3/arch/powerpc/kernel/setup_32.c__orig 2007-03-15 00:05:02.000000000 +0100
+++ linux-2.6.21rc3/arch/powerpc/kernel/setup_32.c 2007-03-15 00:07:02.000000000 +0100
@@ -195,18 +195,22 @@ EXPORT_SYMBOL(nvram_sync);
#endif /* CONFIG_NVRAM */
-static struct cpu cpu_devices[NR_CPUS];
+static DEFINE_PER_CPU(struct cpu, cpu_devices);
int __init ppc_init(void)
{
- int i;
+ int cpu;
/* clear the progress line */
- if ( ppc_md.progress ) ppc_md.progress(" ", 0xffff);
+ if (ppc_md.progress)
+ ppc_md.progress(" ", 0xffff);
/* register CPU devices */
- for_each_possible_cpu(i)
- register_cpu(&cpu_devices[i], i);
+ for_each_possible_cpu(cpu) {
+ struct cpu *c = &per_cpu(cpu_devices, cpu);
+ c->hotpluggable = 1;
+ register_cpu(c, cpu);
+ }
/* call platform init */
if (ppc_md.init != NULL) {
--
Giuliano.
next prev parent reply other threads:[~2007-03-14 23:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20070311222652.5ea40da1.pochini@shiny.it>
[not found] ` <20070312085826.GA9985@osiris.boeblingen.de.ibm.com>
2007-03-12 22:48 ` /sys/devices/system/cpu/cpuX/online are missing Giuliano Pochini
2007-03-13 0:39 ` Andreas Schwab
2007-03-13 9:03 ` Heiko Carstens
2007-03-13 9:11 ` Heiko Carstens
2007-03-13 9:40 ` Russell King
2007-03-13 9:56 ` Russell King
2007-03-14 23:30 ` Giuliano Pochini [this message]
2007-03-13 9:44 ` Andreas Schwab
2007-03-13 9:53 ` Giuliano Pochini
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=20070315003020.250097b1.pochini@shiny.it \
--to=pochini@shiny.it \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=pochini@denise.shiny.it \
--cc=rmk+lkml@arm.linux.org.uk \
--cc=suresh.b.siddha@intel.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).