diff options
Diffstat (limited to 'arch/x86/mm/init_64.c')
-rw-r--r-- | arch/x86/mm/init_64.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 18c6a006e406..97c2bc741e94 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c | |||
@@ -148,15 +148,15 @@ static __init void *spp_getpage(void) | |||
148 | return ptr; | 148 | return ptr; |
149 | } | 149 | } |
150 | 150 | ||
151 | static __init void | 151 | void |
152 | set_pte_phys(unsigned long vaddr, unsigned long phys, pgprot_t prot) | 152 | set_pte_vaddr(unsigned long vaddr, pte_t new_pte) |
153 | { | 153 | { |
154 | pgd_t *pgd; | 154 | pgd_t *pgd; |
155 | pud_t *pud; | 155 | pud_t *pud; |
156 | pmd_t *pmd; | 156 | pmd_t *pmd; |
157 | pte_t *pte, new_pte; | 157 | pte_t *pte; |
158 | 158 | ||
159 | pr_debug("set_pte_phys %lx to %lx\n", vaddr, phys); | 159 | pr_debug("set_pte_vaddr %lx to %lx\n", vaddr, native_pte_val(new_pte)); |
160 | 160 | ||
161 | pgd = pgd_offset_k(vaddr); | 161 | pgd = pgd_offset_k(vaddr); |
162 | if (pgd_none(*pgd)) { | 162 | if (pgd_none(*pgd)) { |
@@ -183,7 +183,6 @@ set_pte_phys(unsigned long vaddr, unsigned long phys, pgprot_t prot) | |||
183 | return; | 183 | return; |
184 | } | 184 | } |
185 | } | 185 | } |
186 | new_pte = pfn_pte(phys >> PAGE_SHIFT, prot); | ||
187 | 186 | ||
188 | pte = pte_offset_kernel(pmd, vaddr); | 187 | pte = pte_offset_kernel(pmd, vaddr); |
189 | if (!pte_none(*pte) && pte_val(new_pte) && | 188 | if (!pte_none(*pte) && pte_val(new_pte) && |
@@ -226,18 +225,6 @@ void __init cleanup_highmap(void) | |||
226 | } | 225 | } |
227 | } | 226 | } |
228 | 227 | ||
229 | /* NOTE: this is meant to be run only at boot */ | ||
230 | void __init __set_fixmap(enum fixed_addresses idx, unsigned long phys, pgprot_t prot) | ||
231 | { | ||
232 | unsigned long address = __fix_to_virt(idx); | ||
233 | |||
234 | if (idx >= __end_of_fixed_addresses) { | ||
235 | printk(KERN_ERR "Invalid __set_fixmap\n"); | ||
236 | return; | ||
237 | } | ||
238 | set_pte_phys(address, phys, prot); | ||
239 | } | ||
240 | |||
241 | static unsigned long __initdata table_start; | 228 | static unsigned long __initdata table_start; |
242 | static unsigned long __meminitdata table_end; | 229 | static unsigned long __meminitdata table_end; |
243 | 230 | ||