aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/pageattr_64.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/mm/pageattr_64.c')
-rw-r--r--arch/x86/mm/pageattr_64.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/mm/pageattr_64.c b/arch/x86/mm/pageattr_64.c
index 5eff244c16db..5a03fb5fd530 100644
--- a/arch/x86/mm/pageattr_64.c
+++ b/arch/x86/mm/pageattr_64.c
@@ -67,7 +67,7 @@ split_large_page(unsigned long address, pgprot_t ref_prot)
67} 67}
68 68
69static int 69static int
70__change_page_attr(unsigned long address, unsigned long pfn, pgprot_t prot) 70__change_page_attr(unsigned long address, struct page *page, pgprot_t prot)
71{ 71{
72 struct page *kpte_page; 72 struct page *kpte_page;
73 pte_t *kpte; 73 pte_t *kpte;
@@ -86,7 +86,7 @@ repeat:
86 prot = canon_pgprot(prot); 86 prot = canon_pgprot(prot);
87 87
88 if (level == 4) { 88 if (level == 4) {
89 set_pte(kpte, pfn_pte(pfn, prot)); 89 set_pte(kpte, mk_pte(page, prot));
90 } else { 90 } else {
91 /* 91 /*
92 * split_large_page will take the reference for this 92 * split_large_page will take the reference for this
@@ -135,7 +135,7 @@ int change_page_attr_addr(unsigned long address, int numpages, pgprot_t prot)
135 unsigned long pfn = __pa(address) >> PAGE_SHIFT; 135 unsigned long pfn = __pa(address) >> PAGE_SHIFT;
136 136
137 if (!kernel_map || pte_present(pfn_pte(0, prot))) { 137 if (!kernel_map || pte_present(pfn_pte(0, prot))) {
138 err = __change_page_attr(address, pfn, prot); 138 err = __change_page_attr(address, pfn_to_page(pfn), prot);
139 if (err) 139 if (err)
140 break; 140 break;
141 } 141 }
@@ -148,7 +148,7 @@ int change_page_attr_addr(unsigned long address, int numpages, pgprot_t prot)
148 addr2 = __START_KERNEL_map + __pa(address); 148 addr2 = __START_KERNEL_map + __pa(address);
149 /* Make sure the kernel mappings stay executable */ 149 /* Make sure the kernel mappings stay executable */
150 prot2 = pte_pgprot(pte_mkexec(pfn_pte(0, prot))); 150 prot2 = pte_pgprot(pte_mkexec(pfn_pte(0, prot)));
151 err = __change_page_attr(addr2, pfn, prot2); 151 err = __change_page_attr(addr2, pfn_to_page(pfn), prot2);
152 } 152 }
153 } 153 }
154 up_write(&init_mm.mmap_sem); 154 up_write(&init_mm.mmap_sem);