aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-09-04 15:09:45 -0400
committerIngo Molnar <mingo@elte.hu>2008-09-04 15:09:45 -0400
commit10a434fcb23a57c385177a0086955fae01003f64 (patch)
tree2688fd54185dd635ae5567fcbbccf99a4d600655 /arch/x86/kernel
parent9d31d35b5f9d619bb2482235cc889326de049e29 (diff)
x86: remove cpu_vendor_dev
1. add c_x86_vendor into cpu_dev 2. change cpu_devs to static 3. check c_x86_vendor before put that cpu_dev into array 4. remove alignment for 64bit 5. order the sequence in cpu_devs according to link sequence... so could put intel at first, then amd... Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r--arch/x86/kernel/cpu/Makefile4
-rw-r--r--arch/x86/kernel/cpu/amd.c3
-rw-r--r--arch/x86/kernel/cpu/amd_64.c4
-rw-r--r--arch/x86/kernel/cpu/centaur.c3
-rw-r--r--arch/x86/kernel/cpu/centaur_64.c3
-rw-r--r--arch/x86/kernel/cpu/common.c71
-rw-r--r--arch/x86/kernel/cpu/common_64.c71
-rw-r--r--arch/x86/kernel/cpu/cpu.h18
-rw-r--r--arch/x86/kernel/cpu/cyrix.c6
-rw-r--r--arch/x86/kernel/cpu/intel.c3
-rw-r--r--arch/x86/kernel/cpu/intel_64.c3
-rw-r--r--arch/x86/kernel/cpu/transmeta.c3
-rw-r--r--arch/x86/kernel/cpu/umc.c3
-rw-r--r--arch/x86/kernel/vmlinux_32.lds.S8
-rw-r--r--arch/x86/kernel/vmlinux_64.lds.S9
15 files changed, 106 insertions, 106 deletions
diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile
index 3ede19a4e0b2..403e689df0b8 100644
--- a/arch/x86/kernel/cpu/Makefile
+++ b/arch/x86/kernel/cpu/Makefile
@@ -8,14 +8,14 @@ obj-y += proc.o capflags.o powerflags.o
8obj-$(CONFIG_X86_32) += common.o bugs.o cmpxchg.o 8obj-$(CONFIG_X86_32) += common.o bugs.o cmpxchg.o
9obj-$(CONFIG_X86_64) += common_64.o bugs_64.o 9obj-$(CONFIG_X86_64) += common_64.o bugs_64.o
10 10
11obj-$(CONFIG_CPU_SUP_INTEL_32) += intel.o
12obj-$(CONFIG_CPU_SUP_INTEL_64) += intel_64.o
11obj-$(CONFIG_CPU_SUP_AMD_32) += amd.o 13obj-$(CONFIG_CPU_SUP_AMD_32) += amd.o
12obj-$(CONFIG_CPU_SUP_AMD_64) += amd_64.o 14obj-$(CONFIG_CPU_SUP_AMD_64) += amd_64.o
13obj-$(CONFIG_CPU_SUP_CYRIX_32) += cyrix.o 15obj-$(CONFIG_CPU_SUP_CYRIX_32) += cyrix.o
14obj-$(CONFIG_CPU_SUP_CENTAUR_32) += centaur.o 16obj-$(CONFIG_CPU_SUP_CENTAUR_32) += centaur.o
15obj-$(CONFIG_CPU_SUP_CENTAUR_64) += centaur_64.o 17obj-$(CONFIG_CPU_SUP_CENTAUR_64) += centaur_64.o
16obj-$(CONFIG_CPU_SUP_TRANSMETA_32) += transmeta.o 18obj-$(CONFIG_CPU_SUP_TRANSMETA_32) += transmeta.o
17obj-$(CONFIG_CPU_SUP_INTEL_32) += intel.o
18obj-$(CONFIG_CPU_SUP_INTEL_64) += intel_64.o
19obj-$(CONFIG_CPU_SUP_UMC_32) += umc.o 19obj-$(CONFIG_CPU_SUP_UMC_32) += umc.o
20 20
21obj-$(CONFIG_X86_MCE) += mcheck/ 21obj-$(CONFIG_X86_MCE) += mcheck/
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index 18514ed26104..d64ea6097ca7 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -298,6 +298,7 @@ static struct cpu_dev amd_cpu_dev __cpuinitdata = {
298 .c_early_init = early_init_amd, 298 .c_early_init = early_init_amd,
299 .c_init = init_amd, 299 .c_init = init_amd,
300 .c_size_cache = amd_size_cache, 300 .c_size_cache = amd_size_cache,
301 .c_x86_vendor = X86_VENDOR_AMD,
301}; 302};
302 303
303cpu_vendor_dev_register(X86_VENDOR_AMD, &amd_cpu_dev); 304cpu_dev_register(amd_cpu_dev);
diff --git a/arch/x86/kernel/cpu/amd_64.c b/arch/x86/kernel/cpu/amd_64.c
index d1692b2a41ff..d1c721c0c49f 100644
--- a/arch/x86/kernel/cpu/amd_64.c
+++ b/arch/x86/kernel/cpu/amd_64.c
@@ -218,7 +218,7 @@ static struct cpu_dev amd_cpu_dev __cpuinitdata = {
218 .c_ident = { "AuthenticAMD" }, 218 .c_ident = { "AuthenticAMD" },
219 .c_early_init = early_init_amd, 219 .c_early_init = early_init_amd,
220 .c_init = init_amd, 220 .c_init = init_amd,
221 .c_x86_vendor = X86_VENDOR_AMD,
221}; 222};
222 223
223cpu_vendor_dev_register(X86_VENDOR_AMD, &amd_cpu_dev); 224cpu_dev_register(amd_cpu_dev);
224
diff --git a/arch/x86/kernel/cpu/centaur.c b/arch/x86/kernel/cpu/centaur.c
index a0534c04d38a..e5f6d89521bf 100644
--- a/arch/x86/kernel/cpu/centaur.c
+++ b/arch/x86/kernel/cpu/centaur.c
@@ -475,6 +475,7 @@ static struct cpu_dev centaur_cpu_dev __cpuinitdata = {
475 .c_early_init = early_init_centaur, 475 .c_early_init = early_init_centaur,
476 .c_init = init_centaur, 476 .c_init = init_centaur,
477 .c_size_cache = centaur_size_cache, 477 .c_size_cache = centaur_size_cache,
478 .c_x86_vendor = X86_VENDOR_CENTAUR,
478}; 479};
479 480
480cpu_vendor_dev_register(X86_VENDOR_CENTAUR, &centaur_cpu_dev); 481cpu_dev_register(centaur_cpu_dev);
diff --git a/arch/x86/kernel/cpu/centaur_64.c b/arch/x86/kernel/cpu/centaur_64.c
index 1d181c40e2e1..49cfc6d2f2fb 100644
--- a/arch/x86/kernel/cpu/centaur_64.c
+++ b/arch/x86/kernel/cpu/centaur_64.c
@@ -29,7 +29,8 @@ static struct cpu_dev centaur_cpu_dev __cpuinitdata = {
29 .c_ident = { "CentaurHauls" }, 29 .c_ident = { "CentaurHauls" },
30 .c_early_init = early_init_centaur, 30 .c_early_init = early_init_centaur,
31 .c_init = init_centaur, 31 .c_init = init_centaur,
32 .c_x86_vendor = X86_VENDOR_CENTAUR,
32}; 33};
33 34
34cpu_vendor_dev_register(X86_VENDOR_CENTAUR, &centaur_cpu_dev); 35cpu_dev_register(centaur_cpu_dev);
35 36
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 10e89ae5a600..ee1044ca481d 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -75,7 +75,7 @@ void switch_to_new_gdt(void)
75static int cachesize_override __cpuinitdata = -1; 75static int cachesize_override __cpuinitdata = -1;
76static int disable_x86_serial_nr __cpuinitdata = 1; 76static int disable_x86_serial_nr __cpuinitdata = 1;
77 77
78struct cpu_dev *cpu_devs[X86_VENDOR_NUM] = {}; 78static struct cpu_dev *cpu_devs[X86_VENDOR_NUM] = {};
79 79
80static void __cpuinit default_init(struct cpuinfo_x86 *c) 80static void __cpuinit default_init(struct cpuinfo_x86 *c)
81{ 81{
@@ -93,8 +93,9 @@ static void __cpuinit default_init(struct cpuinfo_x86 *c)
93static struct cpu_dev __cpuinitdata default_cpu = { 93static struct cpu_dev __cpuinitdata default_cpu = {
94 .c_init = default_init, 94 .c_init = default_init,
95 .c_vendor = "Unknown", 95 .c_vendor = "Unknown",
96 .c_x86_vendor = X86_VENDOR_UNKNOWN,
96}; 97};
97static struct cpu_dev *this_cpu __cpuinitdata = &default_cpu; 98static struct cpu_dev *this_cpu __cpuinitdata;
98 99
99static int __init cachesize_setup(char *str) 100static int __init cachesize_setup(char *str)
100{ 101{
@@ -250,21 +251,24 @@ static void __cpuinit get_cpu_vendor(struct cpuinfo_x86 *c)
250 static int printed; 251 static int printed;
251 252
252 for (i = 0; i < X86_VENDOR_NUM; i++) { 253 for (i = 0; i < X86_VENDOR_NUM; i++) {
253 if (cpu_devs[i]) { 254 if (!cpu_devs[i])
254 if (!strcmp(v, cpu_devs[i]->c_ident[0]) || 255 break;
255 (cpu_devs[i]->c_ident[1] && 256
256 !strcmp(v, cpu_devs[i]->c_ident[1]))) { 257 if (!strcmp(v, cpu_devs[i]->c_ident[0]) ||
257 c->x86_vendor = i; 258 (cpu_devs[i]->c_ident[1] &&
258 this_cpu = cpu_devs[i]; 259 !strcmp(v, cpu_devs[i]->c_ident[1]))) {
259 return; 260 this_cpu = cpu_devs[i];
260 } 261 c->x86_vendor = this_cpu->c_x86_vendor;
262 return;
261 } 263 }
262 } 264 }
265
263 if (!printed) { 266 if (!printed) {
264 printed++; 267 printed++;
265 printk(KERN_ERR "CPU: Vendor unknown, using generic init.\n"); 268 printk(KERN_ERR "CPU: Vendor unknown, using generic init.\n");
266 printk(KERN_ERR "CPU: Your system may be unstable.\n"); 269 printk(KERN_ERR "CPU: Your system may be unstable.\n");
267 } 270 }
271
268 c->x86_vendor = X86_VENDOR_UNKNOWN; 272 c->x86_vendor = X86_VENDOR_UNKNOWN;
269 this_cpu = &default_cpu; 273 this_cpu = &default_cpu;
270} 274}
@@ -315,25 +319,6 @@ static int __cpuinit have_cpuid_p(void)
315 return flag_is_changeable_p(X86_EFLAGS_ID); 319 return flag_is_changeable_p(X86_EFLAGS_ID);
316} 320}
317 321
318static void __init early_cpu_support_print(void)
319{
320 int i,j;
321 struct cpu_dev *cpu_devx;
322
323 printk("KERNEL supported cpus:\n");
324 for (i = 0; i < X86_VENDOR_NUM; i++) {
325 cpu_devx = cpu_devs[i];
326 if (!cpu_devx)
327 continue;
328 for (j = 0; j < 2; j++) {
329 if (!cpu_devx->c_ident[j])
330 continue;
331 printk(" %s %s\n", cpu_devx->c_vendor,
332 cpu_devx->c_ident[j]);
333 }
334 }
335}
336
337void __cpuinit cpu_detect(struct cpuinfo_x86 *c) 322void __cpuinit cpu_detect(struct cpuinfo_x86 *c)
338{ 323{
339 /* Get vendor name */ 324 /* Get vendor name */
@@ -411,21 +396,35 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c)
411 396
412 get_cpu_cap(c); 397 get_cpu_cap(c);
413 398
414 if (c->x86_vendor != X86_VENDOR_UNKNOWN && 399 if (this_cpu->c_early_init)
415 cpu_devs[c->x86_vendor]->c_early_init) 400 this_cpu->c_early_init(c);
416 cpu_devs[c->x86_vendor]->c_early_init(c);
417 401
418 validate_pat_support(c); 402 validate_pat_support(c);
419} 403}
420 404
421void __init early_cpu_init(void) 405void __init early_cpu_init(void)
422{ 406{
423 struct cpu_vendor_dev *cvdev; 407 struct cpu_dev **cdev;
408 int count = 0;
409
410 printk("KERNEL supported cpus:\n");
411 for (cdev = __x86_cpu_dev_start; cdev < __x86_cpu_dev_end; cdev++) {
412 struct cpu_dev *cpudev = *cdev;
413 unsigned int j;
424 414
425 for (cvdev = __x86cpuvendor_start; cvdev < __x86cpuvendor_end; cvdev++) 415 if (count >= X86_VENDOR_NUM)
426 cpu_devs[cvdev->vendor] = cvdev->cpu_dev; 416 break;
417 cpu_devs[count] = cpudev;
418 count++;
419
420 for (j = 0; j < 2; j++) {
421 if (!cpudev->c_ident[j])
422 continue;
423 printk(" %s %s\n", cpudev->c_vendor,
424 cpudev->c_ident[j]);
425 }
426 }
427 427
428 early_cpu_support_print();
429 early_identify_cpu(&boot_cpu_data); 428 early_identify_cpu(&boot_cpu_data);
430} 429}
431 430
diff --git a/arch/x86/kernel/cpu/common_64.c b/arch/x86/kernel/cpu/common_64.c
index 522a5f2e405d..b82479c10835 100644
--- a/arch/x86/kernel/cpu/common_64.c
+++ b/arch/x86/kernel/cpu/common_64.c
@@ -66,7 +66,7 @@ void switch_to_new_gdt(void)
66 load_gdt(&gdt_descr); 66 load_gdt(&gdt_descr);
67} 67}
68 68
69struct cpu_dev *cpu_devs[X86_VENDOR_NUM] = {}; 69static struct cpu_dev *cpu_devs[X86_VENDOR_NUM] = {};
70 70
71static void __cpuinit default_init(struct cpuinfo_x86 *c) 71static void __cpuinit default_init(struct cpuinfo_x86 *c)
72{ 72{
@@ -76,8 +76,9 @@ static void __cpuinit default_init(struct cpuinfo_x86 *c)
76static struct cpu_dev __cpuinitdata default_cpu = { 76static struct cpu_dev __cpuinitdata default_cpu = {
77 .c_init = default_init, 77 .c_init = default_init,
78 .c_vendor = "Unknown", 78 .c_vendor = "Unknown",
79 .c_x86_vendor = X86_VENDOR_UNKNOWN,
79}; 80};
80static struct cpu_dev *this_cpu __cpuinitdata = &default_cpu; 81static struct cpu_dev *this_cpu __cpuinitdata;
81 82
82int __cpuinit get_model_name(struct cpuinfo_x86 *c) 83int __cpuinit get_model_name(struct cpuinfo_x86 *c)
83{ 84{
@@ -178,44 +179,28 @@ static void __cpuinit get_cpu_vendor(struct cpuinfo_x86 *c)
178 static int printed; 179 static int printed;
179 180
180 for (i = 0; i < X86_VENDOR_NUM; i++) { 181 for (i = 0; i < X86_VENDOR_NUM; i++) {
181 if (cpu_devs[i]) { 182 if (!cpu_devs[i])
182 if (!strcmp(v, cpu_devs[i]->c_ident[0]) || 183 break;
183 (cpu_devs[i]->c_ident[1] && 184
184 !strcmp(v, cpu_devs[i]->c_ident[1]))) { 185 if (!strcmp(v, cpu_devs[i]->c_ident[0]) ||
185 c->x86_vendor = i; 186 (cpu_devs[i]->c_ident[1] &&
186 this_cpu = cpu_devs[i]; 187 !strcmp(v, cpu_devs[i]->c_ident[1]))) {
187 return; 188 this_cpu = cpu_devs[i];
188 } 189 c->x86_vendor = this_cpu->c_x86_vendor;
190 return;
189 } 191 }
190 } 192 }
193
191 if (!printed) { 194 if (!printed) {
192 printed++; 195 printed++;
193 printk(KERN_ERR "CPU: Vendor unknown, using generic init.\n"); 196 printk(KERN_ERR "CPU: Vendor unknown, using generic init.\n");
194 printk(KERN_ERR "CPU: Your system may be unstable.\n"); 197 printk(KERN_ERR "CPU: Your system may be unstable.\n");
195 } 198 }
199
196 c->x86_vendor = X86_VENDOR_UNKNOWN; 200 c->x86_vendor = X86_VENDOR_UNKNOWN;
197 this_cpu = &default_cpu; 201 this_cpu = &default_cpu;
198} 202}
199 203
200static void __init early_cpu_support_print(void)
201{
202 int i,j;
203 struct cpu_dev *cpu_devx;
204
205 printk("KERNEL supported cpus:\n");
206 for (i = 0; i < X86_VENDOR_NUM; i++) {
207 cpu_devx = cpu_devs[i];
208 if (!cpu_devx)
209 continue;
210 for (j = 0; j < 2; j++) {
211 if (!cpu_devx->c_ident[j])
212 continue;
213 printk(" %s %s\n", cpu_devx->c_vendor,
214 cpu_devx->c_ident[j]);
215 }
216 }
217}
218
219void __cpuinit cpu_detect(struct cpuinfo_x86 *c) 204void __cpuinit cpu_detect(struct cpuinfo_x86 *c)
220{ 205{
221 /* Get vendor name */ 206 /* Get vendor name */
@@ -306,21 +291,35 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c)
306 291
307 get_cpu_cap(c); 292 get_cpu_cap(c);
308 293
309 if (c->x86_vendor != X86_VENDOR_UNKNOWN && 294 if (this_cpu->c_early_init)
310 cpu_devs[c->x86_vendor]->c_early_init) 295 this_cpu->c_early_init(c);
311 cpu_devs[c->x86_vendor]->c_early_init(c);
312 296
313 validate_pat_support(c); 297 validate_pat_support(c);
314} 298}
315 299
316void __init early_cpu_init(void) 300void __init early_cpu_init(void)
317{ 301{
318 struct cpu_vendor_dev *cvdev; 302 struct cpu_dev **cdev;
303 int count = 0;
304
305 printk("KERNEL supported cpus:\n");
306 for (cdev = __x86_cpu_dev_start; cdev < __x86_cpu_dev_end; cdev++) {
307 struct cpu_dev *cpudev = *cdev;
308 unsigned int j;
319 309
320 for (cvdev = __x86cpuvendor_start; cvdev < __x86cpuvendor_end; cvdev++) 310 if (count >= X86_VENDOR_NUM)
321 cpu_devs[cvdev->vendor] = cvdev->cpu_dev; 311 break;
312 cpu_devs[count] = cpudev;
313 count++;
314
315 for (j = 0; j < 2; j++) {
316 if (!cpudev->c_ident[j])
317 continue;
318 printk(" %s %s\n", cpudev->c_vendor,
319 cpudev->c_ident[j]);
320 }
321 }
322 322
323 early_cpu_support_print();
324 early_identify_cpu(&boot_cpu_data); 323 early_identify_cpu(&boot_cpu_data);
325} 324}
326 325
diff --git a/arch/x86/kernel/cpu/cpu.h b/arch/x86/kernel/cpu/cpu.h
index 4d894e8565fe..3cc9d92afd8f 100644
--- a/arch/x86/kernel/cpu/cpu.h
+++ b/arch/x86/kernel/cpu/cpu.h
@@ -21,21 +21,15 @@ struct cpu_dev {
21 void (*c_init)(struct cpuinfo_x86 * c); 21 void (*c_init)(struct cpuinfo_x86 * c);
22 void (*c_identify)(struct cpuinfo_x86 * c); 22 void (*c_identify)(struct cpuinfo_x86 * c);
23 unsigned int (*c_size_cache)(struct cpuinfo_x86 * c, unsigned int size); 23 unsigned int (*c_size_cache)(struct cpuinfo_x86 * c, unsigned int size);
24 int c_x86_vendor;
24}; 25};
25 26
26extern struct cpu_dev * cpu_devs [X86_VENDOR_NUM]; 27#define cpu_dev_register(cpu_devX) \
28 static struct cpu_dev *__cpu_dev_##cpu_devX __used \
29 __attribute__((__section__(".x86_cpu_dev.init"))) = \
30 &cpu_devX;
27 31
28struct cpu_vendor_dev { 32extern struct cpu_dev *__x86_cpu_dev_start[], *__x86_cpu_dev_end[];
29 int vendor;
30 struct cpu_dev *cpu_dev;
31};
32
33#define cpu_vendor_dev_register(cpu_vendor_id, cpu_dev) \
34 static struct cpu_vendor_dev __cpu_vendor_dev_##cpu_vendor_id __used \
35 __attribute__((__section__(".x86cpuvendor.init"))) = \
36 { cpu_vendor_id, cpu_dev }
37
38extern struct cpu_vendor_dev __x86cpuvendor_start[], __x86cpuvendor_end[];
39 33
40extern int get_model_name(struct cpuinfo_x86 *c); 34extern int get_model_name(struct cpuinfo_x86 *c);
41extern void display_cacheinfo(struct cpuinfo_x86 *c); 35extern void display_cacheinfo(struct cpuinfo_x86 *c);
diff --git a/arch/x86/kernel/cpu/cyrix.c b/arch/x86/kernel/cpu/cyrix.c
index 13f8fa16b815..3f8c7283d816 100644
--- a/arch/x86/kernel/cpu/cyrix.c
+++ b/arch/x86/kernel/cpu/cyrix.c
@@ -442,14 +442,16 @@ static struct cpu_dev cyrix_cpu_dev __cpuinitdata = {
442 .c_early_init = early_init_cyrix, 442 .c_early_init = early_init_cyrix,
443 .c_init = init_cyrix, 443 .c_init = init_cyrix,
444 .c_identify = cyrix_identify, 444 .c_identify = cyrix_identify,
445 .c_x86_vendor = X86_VENDOR_CYRIX,
445}; 446};
446 447
447cpu_vendor_dev_register(X86_VENDOR_CYRIX, &cyrix_cpu_dev); 448cpu_dev_register(cyrix_cpu_dev);
448 449
449static struct cpu_dev nsc_cpu_dev __cpuinitdata = { 450static struct cpu_dev nsc_cpu_dev __cpuinitdata = {
450 .c_vendor = "NSC", 451 .c_vendor = "NSC",
451 .c_ident = { "Geode by NSC" }, 452 .c_ident = { "Geode by NSC" },
452 .c_init = init_nsc, 453 .c_init = init_nsc,
454 .c_x86_vendor = X86_VENDOR_NSC,
453}; 455};
454 456
455cpu_vendor_dev_register(X86_VENDOR_NSC, &nsc_cpu_dev); 457cpu_dev_register(nsc_cpu_dev);
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
index 77618c717d76..c5ac08124adc 100644
--- a/arch/x86/kernel/cpu/intel.c
+++ b/arch/x86/kernel/cpu/intel.c
@@ -303,9 +303,10 @@ static struct cpu_dev intel_cpu_dev __cpuinitdata = {
303 .c_early_init = early_init_intel, 303 .c_early_init = early_init_intel,
304 .c_init = init_intel, 304 .c_init = init_intel,
305 .c_size_cache = intel_size_cache, 305 .c_size_cache = intel_size_cache,
306 .c_x86_vendor = X86_VENDOR_INTEL,
306}; 307};
307 308
308cpu_vendor_dev_register(X86_VENDOR_INTEL, &intel_cpu_dev); 309cpu_dev_register(intel_cpu_dev);
309 310
310/* arch_initcall(intel_cpu_init); */ 311/* arch_initcall(intel_cpu_init); */
311 312
diff --git a/arch/x86/kernel/cpu/intel_64.c b/arch/x86/kernel/cpu/intel_64.c
index 1019c58d39f0..0a8128a240df 100644
--- a/arch/x86/kernel/cpu/intel_64.c
+++ b/arch/x86/kernel/cpu/intel_64.c
@@ -90,6 +90,7 @@ static struct cpu_dev intel_cpu_dev __cpuinitdata = {
90 .c_ident = { "GenuineIntel" }, 90 .c_ident = { "GenuineIntel" },
91 .c_early_init = early_init_intel, 91 .c_early_init = early_init_intel,
92 .c_init = init_intel, 92 .c_init = init_intel,
93 .c_x86_vendor = X86_VENDOR_INTEL,
93}; 94};
94cpu_vendor_dev_register(X86_VENDOR_INTEL, &intel_cpu_dev);
95 95
96cpu_dev_register(intel_cpu_dev);
diff --git a/arch/x86/kernel/cpu/transmeta.c b/arch/x86/kernel/cpu/transmeta.c
index b911a2c61b8f..7c46e6ecedca 100644
--- a/arch/x86/kernel/cpu/transmeta.c
+++ b/arch/x86/kernel/cpu/transmeta.c
@@ -102,6 +102,7 @@ static struct cpu_dev transmeta_cpu_dev __cpuinitdata = {
102 .c_ident = { "GenuineTMx86", "TransmetaCPU" }, 102 .c_ident = { "GenuineTMx86", "TransmetaCPU" },
103 .c_init = init_transmeta, 103 .c_init = init_transmeta,
104 .c_identify = transmeta_identify, 104 .c_identify = transmeta_identify,
105 .c_x86_vendor = X86_VENDOR_TRANSMETA,
105}; 106};
106 107
107cpu_vendor_dev_register(X86_VENDOR_TRANSMETA, &transmeta_cpu_dev); 108cpu_dev_register(transmeta_cpu_dev);
diff --git a/arch/x86/kernel/cpu/umc.c b/arch/x86/kernel/cpu/umc.c
index b1fc90989d75..e777f79e0960 100644
--- a/arch/x86/kernel/cpu/umc.c
+++ b/arch/x86/kernel/cpu/umc.c
@@ -19,7 +19,8 @@ static struct cpu_dev umc_cpu_dev __cpuinitdata = {
19 } 19 }
20 }, 20 },
21 }, 21 },
22 .c_x86_vendor = X86_VENDOR_UMC,
22}; 23};
23 24
24cpu_vendor_dev_register(X86_VENDOR_UMC, &umc_cpu_dev); 25cpu_dev_register(umc_cpu_dev);
25 26
diff --git a/arch/x86/kernel/vmlinux_32.lds.S b/arch/x86/kernel/vmlinux_32.lds.S
index af5bdad84604..21b4f7eefaab 100644
--- a/arch/x86/kernel/vmlinux_32.lds.S
+++ b/arch/x86/kernel/vmlinux_32.lds.S
@@ -140,10 +140,10 @@ SECTIONS
140 *(.con_initcall.init) 140 *(.con_initcall.init)
141 __con_initcall_end = .; 141 __con_initcall_end = .;
142 } 142 }
143 .x86cpuvendor.init : AT(ADDR(.x86cpuvendor.init) - LOAD_OFFSET) { 143 .x86_cpu_dev.init : AT(ADDR(.x86_cpu_dev.init) - LOAD_OFFSET) {
144 __x86cpuvendor_start = .; 144 __x86_cpu_dev_start = .;
145 *(.x86cpuvendor.init) 145 *(.x86_cpu_dev.init)
146 __x86cpuvendor_end = .; 146 __x86_cpu_dev_end = .;
147 } 147 }
148 SECURITY_INIT 148 SECURITY_INIT
149 . = ALIGN(4); 149 . = ALIGN(4);
diff --git a/arch/x86/kernel/vmlinux_64.lds.S b/arch/x86/kernel/vmlinux_64.lds.S
index 63e5c1a22e88..201e81a91a95 100644
--- a/arch/x86/kernel/vmlinux_64.lds.S
+++ b/arch/x86/kernel/vmlinux_64.lds.S
@@ -168,13 +168,12 @@ SECTIONS
168 *(.con_initcall.init) 168 *(.con_initcall.init)
169 } 169 }
170 __con_initcall_end = .; 170 __con_initcall_end = .;
171 . = ALIGN(16); 171 __x86_cpu_dev_start = .;
172 __x86cpuvendor_start = .; 172 .x86_cpu_dev.init : AT(ADDR(.x86_cpu_dev.init) - LOAD_OFFSET) {
173 .x86cpuvendor.init : AT(ADDR(.x86cpuvendor.init) - LOAD_OFFSET) { 173 *(.x86_cpu_dev.init)
174 *(.x86cpuvendor.init)
175 } 174 }
176 __x86cpuvendor_end = .;
177 SECURITY_INIT 175 SECURITY_INIT
176 __x86_cpu_dev_end = .;
178 177
179 . = ALIGN(8); 178 . = ALIGN(8);
180 .parainstructions : AT(ADDR(.parainstructions) - LOAD_OFFSET) { 179 .parainstructions : AT(ADDR(.parainstructions) - LOAD_OFFSET) {