aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/mm/pageattr.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-02-24 16:11:51 -0800
committerH. Peter Anvin <hpa@zytor.com>2009-02-24 16:11:51 -0800
commit638bee71c83a2837b48062fdc5b222163cf53d79 (patch)
tree9c1699c07a5aa547d769138317279b8ee1ba89e8 /arch/x86/mm/pageattr.c
parent2aaa822984b97efd894d10d1e1382206ef0291a7 (diff)
parenta852cbfaaf8122827602027b1614971cfd832304 (diff)
Merge branch 'x86/core' into x86/mce2
Diffstat (limited to 'arch/x86/mm/pageattr.c')
-rw-r--r--arch/x86/mm/pageattr.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
index 7be47d1a97e..8253bc97587 100644
--- a/arch/x86/mm/pageattr.c
+++ b/arch/x86/mm/pageattr.c
@@ -482,6 +482,13 @@ static int split_large_page(pte_t *kpte, unsigned long address)
pbase = (pte_t *)page_address(base);
paravirt_alloc_pte(&init_mm, page_to_pfn(base));
ref_prot = pte_pgprot(pte_clrhuge(*kpte));
+ /*
+ * If we ever want to utilize the PAT bit, we need to
+ * update this function to make sure it's converted from
+ * bit 12 to bit 7 when we cross from the 2MB level to
+ * the 4K level:
+ */
+ WARN_ON_ONCE(pgprot_val(ref_prot) & _PAGE_PAT_LARGE);
#ifdef CONFIG_X86_64
if (level == PG_LEVEL_1G) {