[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] On opt_nosmp, also force num_cores to 1. Do this in setup.c
# HG changeset patch # User kaf24@xxxxxxxxxxxxxxxxxxxx # Node ID 7599a943b39e5eb2ed612d0738cf27913cb78885 # Parent 828d512b22ba49667100eaf62f32e90212f6e93d On opt_nosmp, also force num_cores to 1. Do this in setup.c instead of cpu/common.c. This is where opt_nosmp is defined, and it reduces diff of cpu/ subdir against native Linux. Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx> diff -r 828d512b22ba -r 7599a943b39e xen/arch/x86/cpu/common.c --- a/xen/arch/x86/cpu/common.c Wed Jul 27 11:02:30 2005 +++ b/xen/arch/x86/cpu/common.c Wed Jul 27 11:20:47 2005 @@ -427,17 +427,12 @@ u32 eax, ebx, ecx, edx; int index_msb, tmp; int cpu = smp_processor_id(); - extern int opt_nosmp; if (!cpu_has(c, X86_FEATURE_HT) || cpu_has(c, X86_FEATURE_CMP_LEGACY)) return; - if (opt_nosmp) { - smp_num_siblings = 1; - } else { - cpuid(1, &eax, &ebx, &ecx, &edx); - smp_num_siblings = (ebx & 0xff0000) >> 16; - } + cpuid(1, &eax, &ebx, &ecx, &edx); + smp_num_siblings = (ebx & 0xff0000) >> 16; if (smp_num_siblings == 1) { printk(KERN_INFO "CPU: Hyper-Threading is disabled\n"); diff -r 828d512b22ba -r 7599a943b39e xen/arch/x86/setup.c --- a/xen/arch/x86/setup.c Wed Jul 27 11:02:30 2005 +++ b/xen/arch/x86/setup.c Wed Jul 27 11:20:47 2005 @@ -35,7 +35,7 @@ #endif /* opt_nosmp: If true, secondary processors are ignored. */ -int opt_nosmp = 0; +static int opt_nosmp = 0; boolean_param("nosmp", opt_nosmp); /* maxcpus: maximum number of CPUs to activate. */ @@ -197,7 +197,12 @@ set_in_cr4(X86_CR4_OSXMMEXCPT); if ( opt_nosmp ) + { max_cpus = 0; + smp_num_siblings = 1; + boot_cpu_data.x86_num_cores = 1; + } + smp_prepare_cpus(max_cpus); /* We aren't hotplug-capable yet. */ diff -r 828d512b22ba -r 7599a943b39e xen/common/domain.c --- a/xen/common/domain.c Wed Jul 27 11:02:30 2005 +++ b/xen/common/domain.c Wed Jul 27 11:20:47 2005 @@ -39,8 +39,8 @@ atomic_set(&d->refcnt, 1); atomic_set(&v->pausecnt, 0); - d->domain_id = dom_id; - v->processor = cpu; + d->domain_id = dom_id; + v->processor = cpu; spin_lock_init(&d->big_lock); _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |