aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/apic/apic.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-03-15 22:00:53 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-15 22:00:53 -0400
commit502f4d4f74219749a9758b9bbc27fb665b2e83ab (patch)
tree78076e71ea6e455354913005f04b53cff124553f /arch/x86/kernel/apic/apic.c
parentda849abeb86ddaa093b0935fde595e8e4dd21ffc (diff)
parente5fea868e6c04343e501176a373d568c1c0094aa (diff)
Merge branch 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86: Fix and clean up generic_processor_info() x86: Don't copy per_cpu cpuinfo for BSP two times x86: Move llc_shared_map out of cpu_info
Diffstat (limited to 'arch/x86/kernel/apic/apic.c')
-rw-r--r--arch/x86/kernel/apic/apic.c39
1 files changed, 20 insertions, 19 deletions
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 76b96d74978a..3606feb7d67c 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -1930,17 +1930,6 @@ void __cpuinit generic_processor_info(int apicid, int version)
1930{ 1930{
1931 int cpu; 1931 int cpu;
1932 1932
1933 /*
1934 * Validate version
1935 */
1936 if (version == 0x0) {
1937 pr_warning("BIOS bug, APIC version is 0 for CPU#%d! "
1938 "fixing up to 0x10. (tell your hw vendor)\n",
1939 version);
1940 version = 0x10;
1941 }
1942 apic_version[apicid] = version;
1943
1944 if (num_processors >= nr_cpu_ids) { 1933 if (num_processors >= nr_cpu_ids) {
1945 int max = nr_cpu_ids; 1934 int max = nr_cpu_ids;
1946 int thiscpu = max + disabled_cpus; 1935 int thiscpu = max + disabled_cpus;
@@ -1954,22 +1943,34 @@ void __cpuinit generic_processor_info(int apicid, int version)
1954 } 1943 }
1955 1944
1956 num_processors++; 1945 num_processors++;
1957 cpu = cpumask_next_zero(-1, cpu_present_mask);
1958
1959 if (version != apic_version[boot_cpu_physical_apicid])
1960 WARN_ONCE(1,
1961 "ACPI: apic version mismatch, bootcpu: %x cpu %d: %x\n",
1962 apic_version[boot_cpu_physical_apicid], cpu, version);
1963
1964 physid_set(apicid, phys_cpu_present_map);
1965 if (apicid == boot_cpu_physical_apicid) { 1946 if (apicid == boot_cpu_physical_apicid) {
1966 /* 1947 /*
1967 * x86_bios_cpu_apicid is required to have processors listed 1948 * x86_bios_cpu_apicid is required to have processors listed
1968 * in same order as logical cpu numbers. Hence the first 1949 * in same order as logical cpu numbers. Hence the first
1969 * entry is BSP, and so on. 1950 * entry is BSP, and so on.
1951 * boot_cpu_init() already hold bit 0 in cpu_present_mask
1952 * for BSP.
1970 */ 1953 */
1971 cpu = 0; 1954 cpu = 0;
1955 } else
1956 cpu = cpumask_next_zero(-1, cpu_present_mask);
1957
1958 /*
1959 * Validate version
1960 */
1961 if (version == 0x0) {
1962 pr_warning("BIOS bug: APIC version is 0 for CPU %d/0x%x, fixing up to 0x10\n",
1963 cpu, apicid);
1964 version = 0x10;
1972 } 1965 }
1966 apic_version[apicid] = version;
1967
1968 if (version != apic_version[boot_cpu_physical_apicid]) {
1969 pr_warning("BIOS bug: APIC version mismatch, boot CPU: %x, CPU %d: version %x\n",
1970 apic_version[boot_cpu_physical_apicid], cpu, version);
1971 }
1972
1973 physid_set(apicid, phys_cpu_present_map);
1973 if (apicid > max_physical_apicid) 1974 if (apicid > max_physical_apicid)
1974 max_physical_apicid = apicid; 1975 max_physical_apicid = apicid;
1975 1976