aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/pageattr.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-02-04 10:48:07 -0500
committerIngo Molnar <mingo@elte.hu>2008-02-04 10:48:07 -0500
commit34508f66b69ff1708192654f631eb8f1d4c52005 (patch)
treef4197d445541c1a04e1bc351b4209136593c20d0 /arch/x86/mm/pageattr.c
parent65e074dffa198978ab0c9976a19b954fbe1183e2 (diff)
x86: AMD Athlon X2 hard hang fix
An Athlon 64 X2 test system showed hard hangs shortly after marking the kernel text read-only, if we tried to preserve largepages and changed the PSE entry from RW to RO. The pagetable code itself is correct, it's the CPU that locked up hard (and not even the NMI watchdog could punch through that hard hang). So be conservative and always do splitups - like we did in the past. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/mm/pageattr.c')
-rw-r--r--arch/x86/mm/pageattr.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
index 40b7ac58e671..3810f7a83b1d 100644
--- a/arch/x86/mm/pageattr.c
+++ b/arch/x86/mm/pageattr.c
@@ -243,6 +243,17 @@ static int try_preserve_large_page(pte_t *kpte, unsigned long address,
243 pgprot_t old_prot, new_prot; 243 pgprot_t old_prot, new_prot;
244 int level, res = CPA_SPLIT; 244 int level, res = CPA_SPLIT;
245 245
246 /*
247 * An Athlon 64 X2 showed hard hangs if we tried to preserve
248 * largepages and changed the PSE entry from RW to RO.
249 *
250 * As AMD CPUs have a long series of erratas in this area,
251 * (and none of the known ones seem to explain this hang),
252 * disable this code until the hang can be debugged:
253 */
254 if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD)
255 return res;
256
246 spin_lock_irqsave(&pgd_lock, flags); 257 spin_lock_irqsave(&pgd_lock, flags);
247 /* 258 /*
248 * Check for races, another CPU might have split this page 259 * Check for races, another CPU might have split this page