common.c (e3c55d406bd8df1a878546002c93db90c42be10c) | common.c (09dc68d958c67c76cf672ec78b7391af453010f8) |
---|---|
1#include <linux/bootmem.h> 2#include <linux/linkage.h> 3#include <linux/bitops.h> 4#include <linux/kernel.h> 5#include <linux/module.h> 6#include <linux/percpu.h> 7#include <linux/string.h> 8#include <linux/delay.h> --- 332 unchanged lines hidden (view full) --- 341 * This table only is used unless init_<vendor>() below doesn't set it; 342 * in particular, if CPUID levels 0x80000002..4 are supported, this 343 * isn't used 344 */ 345 346/* Look up CPU names by table lookup. */ 347static const char *table_lookup_model(struct cpuinfo_x86 *c) 348{ | 1#include <linux/bootmem.h> 2#include <linux/linkage.h> 3#include <linux/bitops.h> 4#include <linux/kernel.h> 5#include <linux/module.h> 6#include <linux/percpu.h> 7#include <linux/string.h> 8#include <linux/delay.h> --- 332 unchanged lines hidden (view full) --- 341 * This table only is used unless init_<vendor>() below doesn't set it; 342 * in particular, if CPUID levels 0x80000002..4 are supported, this 343 * isn't used 344 */ 345 346/* Look up CPU names by table lookup. */ 347static const char *table_lookup_model(struct cpuinfo_x86 *c) 348{ |
349 const struct cpu_model_info *info; | 349#ifdef CONFIG_X86_32 350 const struct legacy_cpu_model_info *info; |
350 351 if (c->x86_model >= 16) 352 return NULL; /* Range check */ 353 354 if (!this_cpu) 355 return NULL; 356 | 351 352 if (c->x86_model >= 16) 353 return NULL; /* Range check */ 354 355 if (!this_cpu) 356 return NULL; 357 |
357 info = this_cpu->c_models; | 358 info = this_cpu->legacy_models; |
358 | 359 |
359 while (info && info->family) { | 360 while (info->family) { |
360 if (info->family == c->x86) 361 return info->model_names[c->x86_model]; 362 info++; 363 } | 361 if (info->family == c->x86) 362 return info->model_names[c->x86_model]; 363 info++; 364 } |
365#endif |
|
364 return NULL; /* Not found */ 365} 366 367__u32 cpu_caps_cleared[NCAPINTS]; 368__u32 cpu_caps_set[NCAPINTS]; 369 370void load_percpu_segment(int cpu) 371{ --- 73 unchanged lines hidden (view full) --- 445 446 cpuid(0x80000006, &dummy, &ebx, &ecx, &edx); 447 l2size = ecx >> 16; 448 449#ifdef CONFIG_X86_64 450 c->x86_tlbsize += ((ebx >> 16) & 0xfff) + (ebx & 0xfff); 451#else 452 /* do processor-specific cache resizing */ | 366 return NULL; /* Not found */ 367} 368 369__u32 cpu_caps_cleared[NCAPINTS]; 370__u32 cpu_caps_set[NCAPINTS]; 371 372void load_percpu_segment(int cpu) 373{ --- 73 unchanged lines hidden (view full) --- 447 448 cpuid(0x80000006, &dummy, &ebx, &ecx, &edx); 449 l2size = ecx >> 16; 450 451#ifdef CONFIG_X86_64 452 c->x86_tlbsize += ((ebx >> 16) & 0xfff) + (ebx & 0xfff); 453#else 454 /* do processor-specific cache resizing */ |
453 if (this_cpu->c_size_cache) 454 l2size = this_cpu->c_size_cache(c, l2size); | 455 if (this_cpu->legacy_cache_size) 456 l2size = this_cpu->legacy_cache_size(c, l2size); |
455 456 /* Allow user to override all this if necessary. */ 457 if (cachesize_override != -1) 458 l2size = cachesize_override; 459 460 if (l2size == 0) 461 return; /* Again, no L2 cache is possible */ 462#endif --- 918 unchanged lines hidden --- | 457 458 /* Allow user to override all this if necessary. */ 459 if (cachesize_override != -1) 460 l2size = cachesize_override; 461 462 if (l2size == 0) 463 return; /* Again, no L2 cache is possible */ 464#endif --- 918 unchanged lines hidden --- |