|
@@ -2021,7 +2021,7 @@ void disconnect_bsp_APIC(int virt_wire_setup)
|
|
apic_write(APIC_LVT1, value);
|
|
apic_write(APIC_LVT1, value);
|
|
}
|
|
}
|
|
|
|
|
|
-int generic_processor_info(int apicid, int version)
|
|
|
|
|
|
+static int __generic_processor_info(int apicid, int version, bool enabled)
|
|
{
|
|
{
|
|
int cpu, max = nr_cpu_ids;
|
|
int cpu, max = nr_cpu_ids;
|
|
bool boot_cpu_detected = physid_isset(boot_cpu_physical_apicid,
|
|
bool boot_cpu_detected = physid_isset(boot_cpu_physical_apicid,
|
|
@@ -2087,7 +2087,6 @@ int generic_processor_info(int apicid, int version)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
|
|
|
|
- num_processors++;
|
|
|
|
if (apicid == boot_cpu_physical_apicid) {
|
|
if (apicid == boot_cpu_physical_apicid) {
|
|
/*
|
|
/*
|
|
* x86_bios_cpu_apicid is required to have processors listed
|
|
* x86_bios_cpu_apicid is required to have processors listed
|
|
@@ -2110,6 +2109,7 @@ int generic_processor_info(int apicid, int version)
|
|
|
|
|
|
pr_warning("APIC: Package limit reached. Processor %d/0x%x ignored.\n",
|
|
pr_warning("APIC: Package limit reached. Processor %d/0x%x ignored.\n",
|
|
thiscpu, apicid);
|
|
thiscpu, apicid);
|
|
|
|
+
|
|
disabled_cpus++;
|
|
disabled_cpus++;
|
|
return -ENOSPC;
|
|
return -ENOSPC;
|
|
}
|
|
}
|
|
@@ -2128,7 +2128,6 @@ int generic_processor_info(int apicid, int version)
|
|
boot_cpu_apic_version, cpu, version);
|
|
boot_cpu_apic_version, cpu, version);
|
|
}
|
|
}
|
|
|
|
|
|
- physid_set(apicid, phys_cpu_present_map);
|
|
|
|
if (apicid > max_physical_apicid)
|
|
if (apicid > max_physical_apicid)
|
|
max_physical_apicid = apicid;
|
|
max_physical_apicid = apicid;
|
|
|
|
|
|
@@ -2141,11 +2140,23 @@ int generic_processor_info(int apicid, int version)
|
|
apic->x86_32_early_logical_apicid(cpu);
|
|
apic->x86_32_early_logical_apicid(cpu);
|
|
#endif
|
|
#endif
|
|
set_cpu_possible(cpu, true);
|
|
set_cpu_possible(cpu, true);
|
|
- set_cpu_present(cpu, true);
|
|
|
|
|
|
+
|
|
|
|
+ if (enabled) {
|
|
|
|
+ num_processors++;
|
|
|
|
+ physid_set(apicid, phys_cpu_present_map);
|
|
|
|
+ set_cpu_present(cpu, true);
|
|
|
|
+ } else {
|
|
|
|
+ disabled_cpus++;
|
|
|
|
+ }
|
|
|
|
|
|
return cpu;
|
|
return cpu;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+int generic_processor_info(int apicid, int version)
|
|
|
|
+{
|
|
|
|
+ return __generic_processor_info(apicid, version, true);
|
|
|
|
+}
|
|
|
|
+
|
|
int hard_smp_processor_id(void)
|
|
int hard_smp_processor_id(void)
|
|
{
|
|
{
|
|
return read_apic_id();
|
|
return read_apic_id();
|