diff options
author | Andreas Herrmann <andreas.herrmann3@amd.com> | 2008-06-10 10:05:18 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-06-12 04:14:22 -0400 |
commit | 97cfab6ac4ddfda0d722393bbf46cc40bc332107 (patch) | |
tree | 699f95483b968bfad891bca59ad46f74949543bc /arch/x86/kernel/cpu | |
parent | ee863ba7ab3d3ed8a9585d378aae69d1e3e9f1b4 (diff) |
x86: PAT: fix ambiguous paranoia check in pat_init()
Starting with commit 8d4a4300854f3971502e81dacd930704cb88f606 (x86:
cleanup PAT cpu validation) the PAT CPU feature flag is not cleared
anymore. Now the error message
"PAT enabled, but CPU feature cleared"
in pat_init() is misleading.
Furthermore the current code does not check for existence of the PAT
CPU feature flag if a CPU is whitelisted in validate_pat_support.
This patch clears pat_wc_enabled if boot CPU has no PAT feature flag
and adapts the paranoia check.
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/cpu')
-rw-r--r-- | arch/x86/kernel/cpu/addon_cpuid_features.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/x86/kernel/cpu/addon_cpuid_features.c b/arch/x86/kernel/cpu/addon_cpuid_features.c index 0fbd06241e07..2df461f06a52 100644 --- a/arch/x86/kernel/cpu/addon_cpuid_features.c +++ b/arch/x86/kernel/cpu/addon_cpuid_features.c | |||
@@ -53,6 +53,9 @@ void __cpuinit init_scattered_cpuid_features(struct cpuinfo_x86 *c) | |||
53 | #ifdef CONFIG_X86_PAT | 53 | #ifdef CONFIG_X86_PAT |
54 | void __cpuinit validate_pat_support(struct cpuinfo_x86 *c) | 54 | void __cpuinit validate_pat_support(struct cpuinfo_x86 *c) |
55 | { | 55 | { |
56 | if (!cpu_has_pat) | ||
57 | pat_disable("PAT not supported by CPU."); | ||
58 | |||
56 | switch (c->x86_vendor) { | 59 | switch (c->x86_vendor) { |
57 | case X86_VENDOR_INTEL: | 60 | case X86_VENDOR_INTEL: |
58 | if (c->x86 == 0xF || (c->x86 == 6 && c->x86_model >= 15)) | 61 | if (c->x86 == 0xF || (c->x86 == 6 && c->x86_model >= 15)) |
@@ -64,8 +67,6 @@ void __cpuinit validate_pat_support(struct cpuinfo_x86 *c) | |||
64 | return; | 67 | return; |
65 | } | 68 | } |
66 | 69 | ||
67 | pat_disable(cpu_has_pat ? | 70 | pat_disable("PAT disabled. Not yet verified on this CPU type."); |
68 | "PAT disabled. Not yet verified on this CPU type." : | ||
69 | "PAT not supported by CPU."); | ||
70 | } | 71 | } |
71 | #endif | 72 | #endif |