aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/apic/apic.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index b9338b8cf420..68219a919dfd 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -1943,10 +1943,28 @@ void disconnect_bsp_APIC(int virt_wire_setup)
1943 1943
1944void __cpuinit generic_processor_info(int apicid, int version) 1944void __cpuinit generic_processor_info(int apicid, int version)
1945{ 1945{
1946 int cpu; 1946 int cpu, max = nr_cpu_ids;
1947 bool boot_cpu_detected = physid_isset(boot_cpu_physical_apicid,
1948 phys_cpu_present_map);
1949
1950 /*
1951 * If boot cpu has not been detected yet, then only allow upto
1952 * nr_cpu_ids - 1 processors and keep one slot free for boot cpu
1953 */
1954 if (!boot_cpu_detected && num_processors >= nr_cpu_ids - 1 &&
1955 apicid != boot_cpu_physical_apicid) {
1956 int thiscpu = max + disabled_cpus - 1;
1957
1958 pr_warning(
1959 "ACPI: NR_CPUS/possible_cpus limit of %i almost"
1960 " reached. Keeping one slot for boot cpu."
1961 " Processor %d/0x%x ignored.\n", max, thiscpu, apicid);
1962
1963 disabled_cpus++;
1964 return;
1965 }
1947 1966
1948 if (num_processors >= nr_cpu_ids) { 1967 if (num_processors >= nr_cpu_ids) {
1949 int max = nr_cpu_ids;
1950 int thiscpu = max + disabled_cpus; 1968 int thiscpu = max + disabled_cpus;
1951 1969
1952 pr_warning( 1970 pr_warning(