|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] [LINUX] Oney 'nosmp' and 'max_cpus=' comm
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID c09d6e997f058a826174c17d040576898dcab110
# Parent f8c53e937b30d1826d56f2923db6edd8d6d52e52
[LINUX] Oney 'nosmp' and 'max_cpus=' command line options.
Based on a patch from Jan Beulich.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
linux-2.6-xen-sparse/drivers/xen/core/smpboot.c | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
diff -r f8c53e937b30 -r c09d6e997f05
linux-2.6-xen-sparse/drivers/xen/core/smpboot.c
--- a/linux-2.6-xen-sparse/drivers/xen/core/smpboot.c Mon Aug 14 15:26:37
2006 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/core/smpboot.c Mon Aug 14 16:12:43
2006 +0100
@@ -255,7 +255,14 @@ void __init smp_prepare_cpus(unsigned in
xen_smp_intr_init(0);
- for_each_cpu_mask (cpu, cpu_possible_map) {
+ /* Restrict the possible_map according to max_cpus. */
+ while ((num_possible_cpus() > 1) && (num_possible_cpus() > max_cpus)) {
+ for (cpu = NR_CPUS-1; !cpu_isset(cpu, cpu_possible_map); cpu--)
+ continue;
+ cpu_clear(cpu, cpu_possible_map);
+ }
+
+ for_each_cpu (cpu) {
if (cpu == 0)
continue;
@@ -266,7 +273,8 @@ void __init smp_prepare_cpus(unsigned in
#endif
gdt_descr->address = get_zeroed_page(GFP_KERNEL);
if (unlikely(!gdt_descr->address)) {
- printk(KERN_CRIT "CPU%d failed to allocate GDT\n", cpu);
+ printk(KERN_CRIT "CPU%d failed to allocate GDT\n",
+ cpu);
continue;
}
gdt_descr->size = GDT_SIZE;
@@ -305,12 +313,6 @@ void __init smp_prepare_cpus(unsigned in
init_xenbus_allowed_cpumask();
- /* Currently, Xen gives no dynamic NUMA/HT info. */
- for (cpu = 1; cpu < NR_CPUS; cpu++) {
- cpu_sibling_map[cpu] = cpumask_of_cpu(cpu);
- cpu_core_map[cpu] = cpumask_of_cpu(cpu);
- }
-
#ifdef CONFIG_X86_IO_APIC
/*
* Here we can be sure that there is an IO-APIC in the system. Let's
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] [LINUX] Oney 'nosmp' and 'max_cpus=' command line options.,
Xen patchbot-unstable <=
|
|
|
|
|