diff options
author | Paul Mackerras <paulus@samba.org> | 2005-10-30 22:40:03 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-10-30 22:40:03 -0500 |
commit | e2f2e58e7968f8446b1078a20a18bf8ea12b4fbc (patch) | |
tree | 31af81b6f7dfe1c9da4280e49d8b9777010ce1e7 /arch/powerpc | |
parent | 734d6524800b6a8362666e893a5f3f29b9ef0be9 (diff) |
powerpc: import a fix from arch/ppc/mm/pgtable.c
... namely, the change to the 2-argument pte_alloc_kernel.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/mm/pgtable_32.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c index f54fb9d3927a..f4e5ac122615 100644 --- a/arch/powerpc/mm/pgtable_32.c +++ b/arch/powerpc/mm/pgtable_32.c | |||
@@ -279,18 +279,16 @@ map_page(unsigned long va, phys_addr_t pa, int flags) | |||
279 | pte_t *pg; | 279 | pte_t *pg; |
280 | int err = -ENOMEM; | 280 | int err = -ENOMEM; |
281 | 281 | ||
282 | spin_lock(&init_mm.page_table_lock); | ||
283 | /* Use upper 10 bits of VA to index the first level map */ | 282 | /* Use upper 10 bits of VA to index the first level map */ |
284 | pd = pmd_offset(pgd_offset_k(va), va); | 283 | pd = pmd_offset(pgd_offset_k(va), va); |
285 | /* Use middle 10 bits of VA to index the second-level map */ | 284 | /* Use middle 10 bits of VA to index the second-level map */ |
286 | pg = pte_alloc_kernel(&init_mm, pd, va); | 285 | pg = pte_alloc_kernel(pd, va); |
287 | if (pg != 0) { | 286 | if (pg != 0) { |
288 | err = 0; | 287 | err = 0; |
289 | set_pte_at(&init_mm, va, pg, pfn_pte(pa >> PAGE_SHIFT, __pgprot(flags))); | 288 | set_pte_at(&init_mm, va, pg, pfn_pte(pa >> PAGE_SHIFT, __pgprot(flags))); |
290 | if (mem_init_done) | 289 | if (mem_init_done) |
291 | flush_HPTE(0, va, pmd_val(*pd)); | 290 | flush_HPTE(0, va, pmd_val(*pd)); |
292 | } | 291 | } |
293 | spin_unlock(&init_mm.page_table_lock); | ||
294 | return err; | 292 | return err; |
295 | } | 293 | } |
296 | 294 | ||