diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-19 20:55:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-19 20:55:12 -0400 |
commit | 016281880439a8665ecf37514865742da58131d4 (patch) | |
tree | 2f6a757a581c71cfb8cd891e0583fbffb359830b /arch/x86/kernel/cpu | |
parent | 17b141803c6c6e27fbade3f97c1c9d8d66c72866 (diff) | |
parent | 865be7a81071a77014c83cd01536c989eed362b4 (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, cpu: Fix detection of Celeron Covington stepping A1 and B0
Documentation, ABI: Update L3 cache index disable text
x86, AMD, cacheinfo: Fix L3 cache index disable checks
x86, AMD, cacheinfo: Fix fallout caused by max3 conversion
x86, cpu: Change NOP selection for certain Intel CPUs
x86, cpu: Clean up and unify the NOP selection infrastructure
x86, percpu: Use ASM_NOP4 instead of hardcoding P6_NOP4
x86, cpu: Move AMD Elan Kconfig under "Processor family"
Fix up trivial conflicts in alternative handling (commit dc326fca2b64
"x86, cpu: Clean up and unify the NOP selection infrastructure" removed
some hacky 5-byte instruction stuff, while commit d430d3d7e646 "jump
label: Introduce static_branch() interface" renamed HAVE_JUMP_LABEL to
CONFIG_JUMP_LABEL in the code that went away)
Diffstat (limited to 'arch/x86/kernel/cpu')
-rw-r--r-- | arch/x86/kernel/cpu/intel.c | 10 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/intel_cacheinfo.c | 20 |
2 files changed, 8 insertions, 22 deletions
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c index fc73a34ba8c9..1edf5ba4fb2b 100644 --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c | |||
@@ -411,12 +411,10 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c) | |||
411 | 411 | ||
412 | switch (c->x86_model) { | 412 | switch (c->x86_model) { |
413 | case 5: | 413 | case 5: |
414 | if (c->x86_mask == 0) { | 414 | if (l2 == 0) |
415 | if (l2 == 0) | 415 | p = "Celeron (Covington)"; |
416 | p = "Celeron (Covington)"; | 416 | else if (l2 == 256) |
417 | else if (l2 == 256) | 417 | p = "Mobile Pentium II (Dixon)"; |
418 | p = "Mobile Pentium II (Dixon)"; | ||
419 | } | ||
420 | break; | 418 | break; |
421 | 419 | ||
422 | case 6: | 420 | case 6: |
diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c index 1ce1af2899df..c105c533ed94 100644 --- a/arch/x86/kernel/cpu/intel_cacheinfo.c +++ b/arch/x86/kernel/cpu/intel_cacheinfo.c | |||
@@ -327,7 +327,6 @@ static void __cpuinit amd_calc_l3_indices(struct amd_l3_cache *l3) | |||
327 | l3->subcaches[2] = sc2 = !(val & BIT(8)) + !(val & BIT(9)); | 327 | l3->subcaches[2] = sc2 = !(val & BIT(8)) + !(val & BIT(9)); |
328 | l3->subcaches[3] = sc3 = !(val & BIT(12)) + !(val & BIT(13)); | 328 | l3->subcaches[3] = sc3 = !(val & BIT(12)) + !(val & BIT(13)); |
329 | 329 | ||
330 | l3->indices = (max(max(max(sc0, sc1), sc2), sc3) << 10) - 1; | ||
331 | l3->indices = (max(max3(sc0, sc1, sc2), sc3) << 10) - 1; | 330 | l3->indices = (max(max3(sc0, sc1, sc2), sc3) << 10) - 1; |
332 | } | 331 | } |
333 | 332 | ||
@@ -454,27 +453,16 @@ int amd_set_l3_disable_slot(struct amd_l3_cache *l3, int cpu, unsigned slot, | |||
454 | { | 453 | { |
455 | int ret = 0; | 454 | int ret = 0; |
456 | 455 | ||
457 | #define SUBCACHE_MASK (3UL << 20) | 456 | /* check if @slot is already used or the index is already disabled */ |
458 | #define SUBCACHE_INDEX 0xfff | ||
459 | |||
460 | /* | ||
461 | * check whether this slot is already used or | ||
462 | * the index is already disabled | ||
463 | */ | ||
464 | ret = amd_get_l3_disable_slot(l3, slot); | 457 | ret = amd_get_l3_disable_slot(l3, slot); |
465 | if (ret >= 0) | 458 | if (ret >= 0) |
466 | return -EINVAL; | 459 | return -EINVAL; |
467 | 460 | ||
468 | /* | 461 | if (index > l3->indices) |
469 | * check whether the other slot has disabled the | ||
470 | * same index already | ||
471 | */ | ||
472 | if (index == amd_get_l3_disable_slot(l3, !slot)) | ||
473 | return -EINVAL; | 462 | return -EINVAL; |
474 | 463 | ||
475 | /* do not allow writes outside of allowed bits */ | 464 | /* check whether the other slot has disabled the same index already */ |
476 | if ((index & ~(SUBCACHE_MASK | SUBCACHE_INDEX)) || | 465 | if (index == amd_get_l3_disable_slot(l3, !slot)) |
477 | ((index & SUBCACHE_INDEX) > l3->indices)) | ||
478 | return -EINVAL; | 466 | return -EINVAL; |
479 | 467 | ||
480 | amd_l3_disable_index(l3, cpu, slot, index); | 468 | amd_l3_disable_index(l3, cpu, slot, index); |