diff options
author | Alexey Starikovskiy <astarikovskiy@suse.de> | 2008-03-27 16:55:22 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-17 11:41:31 -0400 |
commit | 903dcb5a1bd0ef2b09d756f646e367cd12659b6f (patch) | |
tree | 393e4d0a10d183406e3d68a28045462cb611b45d /arch/x86/kernel/mpparse_32.c | |
parent | acff5a768935f7f39e4e3be03940d70c005ffe96 (diff) |
x86: move generic_processor_info to apic_32.c
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/mpparse_32.c')
-rw-r--r-- | arch/x86/kernel/mpparse_32.c | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/arch/x86/kernel/mpparse_32.c b/arch/x86/kernel/mpparse_32.c index c79d6e06c3fa..cd4522b3e90e 100644 --- a/arch/x86/kernel/mpparse_32.c +++ b/arch/x86/kernel/mpparse_32.c | |||
@@ -35,7 +35,6 @@ | |||
35 | 35 | ||
36 | /* Have we found an MP table */ | 36 | /* Have we found an MP table */ |
37 | int smp_found_config; | 37 | int smp_found_config; |
38 | unsigned int __cpuinitdata maxcpus = NR_CPUS; | ||
39 | 38 | ||
40 | /* | 39 | /* |
41 | * Various Linux-internal data structures created from the | 40 | * Various Linux-internal data structures created from the |
@@ -105,86 +104,6 @@ static int mpc_record; | |||
105 | static struct mpc_config_translation *translation_table[MAX_MPC_ENTRY] __cpuinitdata; | 104 | static struct mpc_config_translation *translation_table[MAX_MPC_ENTRY] __cpuinitdata; |
106 | #endif | 105 | #endif |
107 | 106 | ||
108 | static void __cpuinit generic_processor_info(int apicid, int version) | ||
109 | { | ||
110 | int cpu; | ||
111 | cpumask_t tmp_map; | ||
112 | physid_mask_t phys_cpu; | ||
113 | |||
114 | /* | ||
115 | * Validate version | ||
116 | */ | ||
117 | if (version == 0x0) { | ||
118 | printk(KERN_WARNING "BIOS bug, APIC version is 0 for CPU#%d! " | ||
119 | "fixing up to 0x10. (tell your hw vendor)\n", | ||
120 | version); | ||
121 | version = 0x10; | ||
122 | } | ||
123 | apic_version[apicid] = version; | ||
124 | |||
125 | phys_cpu = apicid_to_cpu_present(apicid); | ||
126 | physids_or(phys_cpu_present_map, phys_cpu_present_map, phys_cpu); | ||
127 | |||
128 | if (num_processors >= NR_CPUS) { | ||
129 | printk(KERN_WARNING "WARNING: NR_CPUS limit of %i reached." | ||
130 | " Processor ignored.\n", NR_CPUS); | ||
131 | return; | ||
132 | } | ||
133 | |||
134 | if (num_processors >= maxcpus) { | ||
135 | printk(KERN_WARNING "WARNING: maxcpus limit of %i reached." | ||
136 | " Processor ignored.\n", maxcpus); | ||
137 | return; | ||
138 | } | ||
139 | |||
140 | num_processors++; | ||
141 | cpus_complement(tmp_map, cpu_present_map); | ||
142 | cpu = first_cpu(tmp_map); | ||
143 | |||
144 | if (apicid == boot_cpu_physical_apicid) | ||
145 | /* | ||
146 | * x86_bios_cpu_apicid is required to have processors listed | ||
147 | * in same order as logical cpu numbers. Hence the first | ||
148 | * entry is BSP, and so on. | ||
149 | */ | ||
150 | cpu = 0; | ||
151 | |||
152 | /* | ||
153 | * Would be preferable to switch to bigsmp when CONFIG_HOTPLUG_CPU=y | ||
154 | * but we need to work other dependencies like SMP_SUSPEND etc | ||
155 | * before this can be done without some confusion. | ||
156 | * if (CPU_HOTPLUG_ENABLED || num_processors > 8) | ||
157 | * - Ashok Raj <ashok.raj@intel.com> | ||
158 | */ | ||
159 | if (num_processors > 8) { | ||
160 | switch (boot_cpu_data.x86_vendor) { | ||
161 | case X86_VENDOR_INTEL: | ||
162 | if (!APIC_XAPIC(version)) { | ||
163 | def_to_bigsmp = 0; | ||
164 | break; | ||
165 | } | ||
166 | /* If P4 and above fall through */ | ||
167 | case X86_VENDOR_AMD: | ||
168 | def_to_bigsmp = 1; | ||
169 | } | ||
170 | } | ||
171 | #ifdef CONFIG_SMP | ||
172 | /* are we being called early in kernel startup? */ | ||
173 | if (x86_cpu_to_apicid_early_ptr) { | ||
174 | u16 *cpu_to_apicid = x86_cpu_to_apicid_early_ptr; | ||
175 | u16 *bios_cpu_apicid = x86_bios_cpu_apicid_early_ptr; | ||
176 | |||
177 | cpu_to_apicid[cpu] = apicid; | ||
178 | bios_cpu_apicid[cpu] = apicid; | ||
179 | } else { | ||
180 | per_cpu(x86_cpu_to_apicid, cpu) = apicid; | ||
181 | per_cpu(x86_bios_cpu_apicid, cpu) = apicid; | ||
182 | } | ||
183 | #endif | ||
184 | cpu_set(cpu, cpu_possible_map); | ||
185 | cpu_set(cpu, cpu_present_map); | ||
186 | } | ||
187 | |||
188 | static void __cpuinit MP_processor_info(struct mpc_config_processor *m) | 107 | static void __cpuinit MP_processor_info(struct mpc_config_processor *m) |
189 | { | 108 | { |
190 | int apicid; | 109 | int apicid; |