summaryrefslogtreecommitdiffstats
path: root/arch/x86_64/mm/pageattr.c
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2006-01-06 22:34:21 +0100
committerLen Brown <len.brown@intel.com>2006-01-06 22:34:21 +0100
commit25da0974601fc8096461f3d3f7ca3aab8e79adfb (patch)
treef9b3c1bfbc63fdb6a94e82177b8c3ae891125422 /arch/x86_64/mm/pageattr.c
parent[ACPI] linux-acpi@vger.kernel.org replaces acpi-devel@lists.sourceforge.net (diff)
parentMerge branch 'post-2.6.15' of git://brick.kernel.dk/data/git/linux-2.6-block (diff)
downloadlinux-25da0974601fc8096461f3d3f7ca3aab8e79adfb.tar.xz
linux-25da0974601fc8096461f3d3f7ca3aab8e79adfb.zip
Auto-update from upstream
Diffstat (limited to 'arch/x86_64/mm/pageattr.c')
-rw-r--r--arch/x86_64/mm/pageattr.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/x86_64/mm/pageattr.c b/arch/x86_64/mm/pageattr.c
index b90e8fe9eeb0..35f1f1aab063 100644
--- a/arch/x86_64/mm/pageattr.c
+++ b/arch/x86_64/mm/pageattr.c
@@ -128,6 +128,7 @@ __change_page_attr(unsigned long address, unsigned long pfn, pgprot_t prot,
pte_t *kpte;
struct page *kpte_page;
unsigned kpte_flags;
+ pgprot_t ref_prot2;
kpte = lookup_address(address);
if (!kpte) return 0;
kpte_page = virt_to_page(((unsigned long)kpte) & PAGE_MASK);
@@ -140,10 +141,14 @@ __change_page_attr(unsigned long address, unsigned long pfn, pgprot_t prot,
* split_large_page will take the reference for this change_page_attr
* on the split page.
*/
- struct page *split = split_large_page(address, prot, ref_prot);
+
+ struct page *split;
+ ref_prot2 = __pgprot(pgprot_val(pte_pgprot(*lookup_address(address))) & ~(1<<_PAGE_BIT_PSE));
+
+ split = split_large_page(address, prot, ref_prot2);
if (!split)
return -ENOMEM;
- set_pte(kpte,mk_pte(split, ref_prot));
+ set_pte(kpte,mk_pte(split, ref_prot2));
kpte_page = split;
}
get_page(kpte_page);