From: Alex Chiang <achiang@hp.com>
To: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org
Cc: linux-acpi@vger.kernel.org, Alex Chiang <achiang@hp.com>,
davem@davemloft.net
Subject: [PATCH 10/14] [SPARC] Populate cpu_enabled_map
Date: Mon, 14 Jul 2008 20:55:27 -0600 [thread overview]
Message-ID: <20080715025527.GB15452@ldl.fc.hp.com> (raw)
Populate the cpu_enabled_map correctly.
Note that this patch does not actually make any decisions based
on the contents of the map.
However, as the map is presented via sysfs in:
/sys/devices/system/cpu/
It should be populated correctly.
Signed-off-by: Alex Chiang <achiang@hp.com>
Cc: David S. Miller <davem@davemloft.net>
---
arch/sparc/kernel/smp.c | 1 +
arch/sparc64/kernel/mdesc.c | 1 +
arch/sparc64/kernel/smp.c | 1 +
3 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/arch/sparc/kernel/smp.c b/arch/sparc/kernel/smp.c
index 6724ab9..154f32c 100644
--- a/arch/sparc/kernel/smp.c
+++ b/arch/sparc/kernel/smp.c
@@ -343,6 +343,7 @@ void __init smp_setup_cpu_possible_map(void)
if (mid < NR_CPUS) {
cpu_set(mid, phys_cpu_present_map);
cpu_set(mid, cpu_present_map);
+ cpu_set(mid, cpu_enabled_map);
}
instance++;
}
diff --git a/arch/sparc64/kernel/mdesc.c b/arch/sparc64/kernel/mdesc.c
index dde52bc..5a77dad 100644
--- a/arch/sparc64/kernel/mdesc.c
+++ b/arch/sparc64/kernel/mdesc.c
@@ -827,6 +827,7 @@ void __cpuinit mdesc_fill_in_cpu_data(cpumask_t mask)
#ifdef CONFIG_SMP
cpu_set(cpuid, cpu_present_map);
+ cpu_set(cpuid, cpu_enabled_map);
#endif
c->core_id = 0;
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c
index fa63c68..652992a 100644
--- a/arch/sparc64/kernel/smp.c
+++ b/arch/sparc64/kernel/smp.c
@@ -1414,6 +1414,7 @@ void __cpu_die(unsigned int cpu)
hv_err = sun4v_cpu_stop(cpu);
if (hv_err == HV_EOK) {
cpu_clear(cpu, cpu_present_map);
+ cpu_clear(cpu, cpu_enabled_map);
break;
}
} while (--limit > 0);
reply other threads:[~2008-07-15 2:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20080715025527.GB15452@ldl.fc.hp.com \
--to=achiang@hp.com \
--cc=davem@davemloft.net \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arch@vger.kernel.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®