diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-04-02 13:37:50 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-04-02 13:38:10 -0400 |
commit | ec5e61aabeac58670691bd0613388d16697d0d81 (patch) | |
tree | 59838509358f27334874b90756505785cde29b02 /arch/x86/kernel/process.c | |
parent | 75ec5a245c7763c397f31ec8964d0a46c54a7386 (diff) | |
parent | 8bb39f9aa068262732fe44b965d7a6eb5a5a7d67 (diff) |
Merge branch 'perf/urgent' into perf/core
Conflicts:
arch/x86/kernel/cpu/perf_event.c
Merge reason: Resolve the conflict, pick up fixes
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/process.c')
-rw-r--r-- | arch/x86/kernel/process.c | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index 8328009416d7..eccdb57094e3 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c | |||
@@ -528,21 +528,37 @@ static int __cpuinit mwait_usable(const struct cpuinfo_x86 *c) | |||
528 | } | 528 | } |
529 | 529 | ||
530 | /* | 530 | /* |
531 | * Check for AMD CPUs, which have potentially C1E support | 531 | * Check for AMD CPUs, where APIC timer interrupt does not wake up CPU from C1e. |
532 | * For more information see | ||
533 | * - Erratum #400 for NPT family 0xf and family 0x10 CPUs | ||
534 | * - Erratum #365 for family 0x11 (not affected because C1e not in use) | ||
532 | */ | 535 | */ |
533 | static int __cpuinit check_c1e_idle(const struct cpuinfo_x86 *c) | 536 | static int __cpuinit check_c1e_idle(const struct cpuinfo_x86 *c) |
534 | { | 537 | { |
538 | u64 val; | ||
535 | if (c->x86_vendor != X86_VENDOR_AMD) | 539 | if (c->x86_vendor != X86_VENDOR_AMD) |
536 | return 0; | 540 | goto no_c1e_idle; |
537 | |||
538 | if (c->x86 < 0x0F) | ||
539 | return 0; | ||
540 | 541 | ||
541 | /* Family 0x0f models < rev F do not have C1E */ | 542 | /* Family 0x0f models < rev F do not have C1E */ |
542 | if (c->x86 == 0x0f && c->x86_model < 0x40) | 543 | if (c->x86 == 0x0F && c->x86_model >= 0x40) |
543 | return 0; | 544 | return 1; |
544 | 545 | ||
545 | return 1; | 546 | if (c->x86 == 0x10) { |
547 | /* | ||
548 | * check OSVW bit for CPUs that are not affected | ||
549 | * by erratum #400 | ||
550 | */ | ||
551 | rdmsrl(MSR_AMD64_OSVW_ID_LENGTH, val); | ||
552 | if (val >= 2) { | ||
553 | rdmsrl(MSR_AMD64_OSVW_STATUS, val); | ||
554 | if (!(val & BIT(1))) | ||
555 | goto no_c1e_idle; | ||
556 | } | ||
557 | return 1; | ||
558 | } | ||
559 | |||
560 | no_c1e_idle: | ||
561 | return 0; | ||
546 | } | 562 | } |
547 | 563 | ||
548 | static cpumask_var_t c1e_mask; | 564 | static cpumask_var_t c1e_mask; |