aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Starikovskiy <astarikovskiy@suse.de>2008-03-27 16:55:34 -0400
committerIngo Molnar <mingo@elte.hu>2008-04-17 11:41:32 -0400
commit0e01c00c1fadd21356a6cf57d6680497256e1a01 (patch)
tree577b4b6566e44f1db54f1689aafbd03fbd91fe81
parent8ccab29ca8c441ae00d878d2f0000275f430f8a5 (diff)
x86: separate generic_processor_info into its own function (64bit)
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--arch/x86/kernel/mpparse_64.c43
1 files changed, 24 insertions, 19 deletions
diff --git a/arch/x86/kernel/mpparse_64.c b/arch/x86/kernel/mpparse_64.c
index 3681b9d8f557..7f8ece4190e6 100644
--- a/arch/x86/kernel/mpparse_64.c
+++ b/arch/x86/kernel/mpparse_64.c
@@ -93,22 +93,10 @@ static int __init mpf_checksum(unsigned char *mp, int len)
93 return sum & 0xFF; 93 return sum & 0xFF;
94} 94}
95 95
96static void __cpuinit MP_processor_info(struct mpc_config_processor *m) 96void __cpuinit generic_processor_info(int apicid, int version)
97{ 97{
98 int cpu; 98 int cpu;
99 cpumask_t tmp_map; 99 cpumask_t tmp_map;
100 char *bootup_cpu = "";
101
102 if (!(m->mpc_cpuflag & CPU_ENABLED)) {
103 disabled_cpus++;
104 return;
105 }
106 if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) {
107 bootup_cpu = " (Bootup-CPU)";
108 boot_cpu_physical_apicid = m->mpc_apicid;
109 }
110
111 printk(KERN_INFO "Processor #%d%s\n", m->mpc_apicid, bootup_cpu);
112 100
113 if (num_processors >= NR_CPUS) { 101 if (num_processors >= NR_CPUS) {
114 printk(KERN_WARNING "WARNING: NR_CPUS limit of %i reached." 102 printk(KERN_WARNING "WARNING: NR_CPUS limit of %i reached."
@@ -126,8 +114,8 @@ static void __cpuinit MP_processor_info(struct mpc_config_processor *m)
126 cpus_complement(tmp_map, cpu_present_map); 114 cpus_complement(tmp_map, cpu_present_map);
127 cpu = first_cpu(tmp_map); 115 cpu = first_cpu(tmp_map);
128 116
129 physid_set(m->mpc_apicid, phys_cpu_present_map); 117 physid_set(apicid, phys_cpu_present_map);
130 if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) { 118 if (apicid == boot_cpu_physical_apicid) {
131 /* 119 /*
132 * x86_bios_cpu_apicid is required to have processors listed 120 * x86_bios_cpu_apicid is required to have processors listed
133 * in same order as logical cpu numbers. Hence the first 121 * in same order as logical cpu numbers. Hence the first
@@ -140,17 +128,34 @@ static void __cpuinit MP_processor_info(struct mpc_config_processor *m)
140 u16 *cpu_to_apicid = x86_cpu_to_apicid_early_ptr; 128 u16 *cpu_to_apicid = x86_cpu_to_apicid_early_ptr;
141 u16 *bios_cpu_apicid = x86_bios_cpu_apicid_early_ptr; 129 u16 *bios_cpu_apicid = x86_bios_cpu_apicid_early_ptr;
142 130
143 cpu_to_apicid[cpu] = m->mpc_apicid; 131 cpu_to_apicid[cpu] = apicid;
144 bios_cpu_apicid[cpu] = m->mpc_apicid; 132 bios_cpu_apicid[cpu] = apicid;
145 } else { 133 } else {
146 per_cpu(x86_cpu_to_apicid, cpu) = m->mpc_apicid; 134 per_cpu(x86_cpu_to_apicid, cpu) = apicid;
147 per_cpu(x86_bios_cpu_apicid, cpu) = m->mpc_apicid; 135 per_cpu(x86_bios_cpu_apicid, cpu) = apicid;
148 } 136 }
149 137
150 cpu_set(cpu, cpu_possible_map); 138 cpu_set(cpu, cpu_possible_map);
151 cpu_set(cpu, cpu_present_map); 139 cpu_set(cpu, cpu_present_map);
152} 140}
153 141
142static void __cpuinit MP_processor_info(struct mpc_config_processor *m)
143{
144 char *bootup_cpu = "";
145
146 if (!(m->mpc_cpuflag & CPU_ENABLED)) {
147 disabled_cpus++;
148 return;
149 }
150 if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) {
151 bootup_cpu = " (Bootup-CPU)";
152 boot_cpu_physical_apicid = m->mpc_apicid;
153 }
154
155 printk(KERN_INFO "Processor #%d%s\n", m->mpc_apicid, bootup_cpu);
156 generic_processor_info(m->mpc_apicid, 0);
157}
158
154static void __init MP_bus_info(struct mpc_config_bus *m) 159static void __init MP_bus_info(struct mpc_config_bus *m)
155{ 160{
156 char str[7]; 161 char str[7];