mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
bitkeeper revision 1.1159.127.1 (4177edc2yMpJyLOU9Q_EQYFZXYJiIw)
Fix option ``noht'' for machines which report HT logical cpus in their MP tables.
This commit is contained in:
1 parent
0dfceca687
commit
ff9da5b2e5
4 files changed
+18
-17
No files matched your search
@@ -23,7 +23,7 @@ extern void time_init(void);
|
||||
extern void ac_timer_init(void);
|
||||
extern void initialize_keytable();
|
||||
extern int opt_nosmp, opt_watchdog, opt_noacpi;
|
||||
extern int opt_ignorebiostables, opt_noht;
|
||||
extern int opt_ignorebiostables;
|
||||
extern int do_timer_lists_from_pit;
|
||||
|
||||
char ignore_irq13; /* set if exception 16 works */
|
||||
@@ -116,12 +116,6 @@ static void __init init_intel(struct cpuinfo_x86 *c)
|
||||
if ( c->x86 == 6 && c->x86_model < 3 && c->x86_mask < 3 )
|
||||
clear_bit(X86_FEATURE_SEP, &c->x86_capability);
|
||||
|
||||
if ( opt_noht )
|
||||
{
|
||||
opt_noacpi = 1; /* Virtual CPUs only appear in ACPI tables. */
|
||||
clear_bit(X86_FEATURE_HT, &c->x86_capability[0]);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
if ( test_bit(X86_FEATURE_HT, &c->x86_capability) )
|
||||
{
|
||||
@@ -129,8 +123,11 @@ static void __init init_intel(struct cpuinfo_x86 *c)
|
||||
int initial_apic_id, siblings, cpu = smp_processor_id();
|
||||
|
||||
cpuid(1, &eax, &ebx, &ecx, &edx);
|
||||
siblings = (ebx & 0xff0000) >> 16;
|
||||
|
||||
ht_per_core = siblings = (ebx & 0xff0000) >> 16;
|
||||
|
||||
if ( opt_noht )
|
||||
clear_bit(X86_FEATURE_HT, &c->x86_capability[0]);
|
||||
|
||||
if ( siblings <= 1 )
|
||||
{
|
||||
printk(KERN_INFO "CPU#%d: Hyper-Threading is disabled\n", cpu);
|
||||
|
||||
@@ -57,6 +57,9 @@ static int max_cpus = -1;
|
||||
/* Total count of live CPUs */
|
||||
int smp_num_cpus = 1;
|
||||
|
||||
/* Number of hyperthreads per core */
|
||||
int ht_per_core = 1;
|
||||
|
||||
/* Bitmask of currently online CPUs */
|
||||
unsigned long cpu_online_map;
|
||||
|
||||
@@ -868,6 +871,12 @@ void __init smp_boot_cpus(void)
|
||||
if (apicid == boot_cpu_apicid)
|
||||
continue;
|
||||
|
||||
/*
|
||||
* Don't start hyperthreads if option noht requested.
|
||||
*/
|
||||
if (opt_noht && (apicid & (ht_per_core - 1)))
|
||||
continue;
|
||||
|
||||
if (!(phys_cpu_present_map & (1 << bit)))
|
||||
continue;
|
||||
if ((max_cpus >= 0) && (max_cpus <= cpucount+1))
|
||||
|
||||
@@ -498,16 +498,9 @@ long do_dom0_op(dom0_op_t *u_dom0_op)
|
||||
|
||||
case DOM0_PHYSINFO:
|
||||
{
|
||||
extern int phys_proc_id[];
|
||||
|
||||
dom0_physinfo_t *pi = &op->u.physinfo;
|
||||
|
||||
int old_id = phys_proc_id[0];
|
||||
int ht = 0;
|
||||
|
||||
while( ( ht < smp_num_cpus ) && ( phys_proc_id[ht] == old_id ) ) ht++;
|
||||
|
||||
pi->ht_per_core = ht;
|
||||
pi->ht_per_core = opt_noht ? 1 : ht_per_core;
|
||||
pi->cores = smp_num_cpus / pi->ht_per_core;
|
||||
pi->total_pages = max_page;
|
||||
pi->free_pages = avail_domheap_pages();
|
||||
|
||||
@@ -52,6 +52,8 @@ extern int smp_call_function (void (*func) (void *info), void *info,
|
||||
extern int smp_threads_ready;
|
||||
|
||||
extern int smp_num_cpus;
|
||||
extern int ht_per_core;
|
||||
extern int opt_noht;
|
||||
|
||||
extern volatile unsigned long smp_msg_data;
|
||||
extern volatile int smp_src_cpu;
|
||||
|
||||