diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:34:02 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:34:02 -0500 |
commit | 0d82494ebd256bfff2336689271367f9284b4865 (patch) | |
tree | d01e3f50db4b5996c8ea3cdd02dd67d98f33311d /arch | |
parent | 34eff1d75b26eac5c04f9c5b52ba9e3bf1dd8877 (diff) |
x86: change 64-bit __change_page_attr() to struct page
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/mm/pageattr_64.c | 8 |
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 | ||
69 | static int | 69 | static 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); |