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 */
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) )
{
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);
/* 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;
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))
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();