From: "David S. Miller" <davem@davemloft.net>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: SMP busted on non-cpu-hotplug systems
Date: Sat, 25 Mar 2006 03:59:00 -0800 (PST) [thread overview]
Message-ID: <20060325.035900.121310564.davem@davemloft.net> (raw)
In-Reply-To: <20060325034744.35b70f43.akpm@osdl.org>
From: Andrew Morton <akpm@osdl.org>
Date: Sat, 25 Mar 2006 03:47:44 -0800
> I think it'd be cleanest to require that the arch do that -
> fixup_cpu_present_map() looks like a bit of a hack.
Indeed it does. I'm planning on doing someting like this
for sparc64:
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c
index 1b6e2ad..7dc28a4 100644
--- a/arch/sparc64/kernel/smp.c
+++ b/arch/sparc64/kernel/smp.c
@@ -1298,6 +1298,7 @@ void __init smp_prepare_cpus(unsigned in
while (!cpu_find_by_instance(instance, NULL, &mid)) {
if (mid != boot_cpu_id) {
cpu_clear(mid, phys_cpu_present_map);
+ cpu_clear(mid, cpu_present_map);
if (num_possible_cpus() <= max_cpus)
break;
}
@@ -1332,8 +1333,10 @@ void __init smp_setup_cpu_possible_map(v
instance = 0;
while (!cpu_find_by_instance(instance, NULL, &mid)) {
- if (mid < NR_CPUS)
+ if (mid < NR_CPUS) {
cpu_set(mid, phys_cpu_present_map);
+ cpu_set(mid, cpu_present_map);
+ }
instance++;
}
}
next prev parent reply other threads:[~2006-03-25 11:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-25 10:42 David S. Miller
2006-03-25 11:47 ` Andrew Morton
2006-03-25 11:59 ` David S. Miller [this message]
2006-03-25 12:06 ` Andrew Morton
2006-03-25 12:05 ` Russell King
2006-03-25 12:06 ` David S. Miller
2006-03-25 12:15 ` Andrew Morton
2006-03-25 12:53 ` Russell King
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=20060325.035900.121310564.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=akpm@osdl.org \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®