diff options
Diffstat (limited to 'arch/ppc')
-rw-r--r-- | arch/ppc/kernel/dma-mapping.c | 6 | ||||
-rw-r--r-- | arch/ppc/mm/4xx_mmu.c | 4 | ||||
-rw-r--r-- | arch/ppc/mm/pgtable.c | 4 |
3 files changed, 2 insertions, 12 deletions
diff --git a/arch/ppc/kernel/dma-mapping.c b/arch/ppc/kernel/dma-mapping.c index 0f710d2baec6..685fd0defe23 100644 --- a/arch/ppc/kernel/dma-mapping.c +++ b/arch/ppc/kernel/dma-mapping.c | |||
@@ -335,8 +335,6 @@ static int __init dma_alloc_init(void) | |||
335 | pte_t *pte; | 335 | pte_t *pte; |
336 | int ret = 0; | 336 | int ret = 0; |
337 | 337 | ||
338 | spin_lock(&init_mm.page_table_lock); | ||
339 | |||
340 | do { | 338 | do { |
341 | pgd = pgd_offset(&init_mm, CONSISTENT_BASE); | 339 | pgd = pgd_offset(&init_mm, CONSISTENT_BASE); |
342 | pmd = pmd_alloc(&init_mm, pgd, CONSISTENT_BASE); | 340 | pmd = pmd_alloc(&init_mm, pgd, CONSISTENT_BASE); |
@@ -347,7 +345,7 @@ static int __init dma_alloc_init(void) | |||
347 | } | 345 | } |
348 | WARN_ON(!pmd_none(*pmd)); | 346 | WARN_ON(!pmd_none(*pmd)); |
349 | 347 | ||
350 | pte = pte_alloc_kernel(&init_mm, pmd, CONSISTENT_BASE); | 348 | pte = pte_alloc_kernel(pmd, CONSISTENT_BASE); |
351 | if (!pte) { | 349 | if (!pte) { |
352 | printk(KERN_ERR "%s: no pte tables\n", __func__); | 350 | printk(KERN_ERR "%s: no pte tables\n", __func__); |
353 | ret = -ENOMEM; | 351 | ret = -ENOMEM; |
@@ -357,8 +355,6 @@ static int __init dma_alloc_init(void) | |||
357 | consistent_pte = pte; | 355 | consistent_pte = pte; |
358 | } while (0); | 356 | } while (0); |
359 | 357 | ||
360 | spin_unlock(&init_mm.page_table_lock); | ||
361 | |||
362 | return ret; | 358 | return ret; |
363 | } | 359 | } |
364 | 360 | ||
diff --git a/arch/ppc/mm/4xx_mmu.c b/arch/ppc/mm/4xx_mmu.c index b7bcbc232f39..4d006aa1a0d1 100644 --- a/arch/ppc/mm/4xx_mmu.c +++ b/arch/ppc/mm/4xx_mmu.c | |||
@@ -110,13 +110,11 @@ unsigned long __init mmu_mapin_ram(void) | |||
110 | pmd_t *pmdp; | 110 | pmd_t *pmdp; |
111 | unsigned long val = p | _PMD_SIZE_16M | _PAGE_HWEXEC | _PAGE_HWWRITE; | 111 | unsigned long val = p | _PMD_SIZE_16M | _PAGE_HWEXEC | _PAGE_HWWRITE; |
112 | 112 | ||
113 | spin_lock(&init_mm.page_table_lock); | ||
114 | pmdp = pmd_offset(pgd_offset_k(v), v); | 113 | pmdp = pmd_offset(pgd_offset_k(v), v); |
115 | pmd_val(*pmdp++) = val; | 114 | pmd_val(*pmdp++) = val; |
116 | pmd_val(*pmdp++) = val; | 115 | pmd_val(*pmdp++) = val; |
117 | pmd_val(*pmdp++) = val; | 116 | pmd_val(*pmdp++) = val; |
118 | pmd_val(*pmdp++) = val; | 117 | pmd_val(*pmdp++) = val; |
119 | spin_unlock(&init_mm.page_table_lock); | ||
120 | 118 | ||
121 | v += LARGE_PAGE_SIZE_16M; | 119 | v += LARGE_PAGE_SIZE_16M; |
122 | p += LARGE_PAGE_SIZE_16M; | 120 | p += LARGE_PAGE_SIZE_16M; |
@@ -127,10 +125,8 @@ unsigned long __init mmu_mapin_ram(void) | |||
127 | pmd_t *pmdp; | 125 | pmd_t *pmdp; |
128 | unsigned long val = p | _PMD_SIZE_4M | _PAGE_HWEXEC | _PAGE_HWWRITE; | 126 | unsigned long val = p | _PMD_SIZE_4M | _PAGE_HWEXEC | _PAGE_HWWRITE; |
129 | 127 | ||
130 | spin_lock(&init_mm.page_table_lock); | ||
131 | pmdp = pmd_offset(pgd_offset_k(v), v); | 128 | pmdp = pmd_offset(pgd_offset_k(v), v); |
132 | pmd_val(*pmdp) = val; | 129 | pmd_val(*pmdp) = val; |
133 | spin_unlock(&init_mm.page_table_lock); | ||
134 | 130 | ||
135 | v += LARGE_PAGE_SIZE_4M; | 131 | v += LARGE_PAGE_SIZE_4M; |
136 | p += LARGE_PAGE_SIZE_4M; | 132 | p += LARGE_PAGE_SIZE_4M; |
diff --git a/arch/ppc/mm/pgtable.c b/arch/ppc/mm/pgtable.c index 43505b1fc5d8..6ea9185fd120 100644 --- a/arch/ppc/mm/pgtable.c +++ b/arch/ppc/mm/pgtable.c | |||
@@ -280,18 +280,16 @@ map_page(unsigned long va, phys_addr_t pa, int flags) | |||
280 | pte_t *pg; | 280 | pte_t *pg; |
281 | int err = -ENOMEM; | 281 | int err = -ENOMEM; |
282 | 282 | ||
283 | spin_lock(&init_mm.page_table_lock); | ||
284 | /* Use upper 10 bits of VA to index the first level map */ | 283 | /* Use upper 10 bits of VA to index the first level map */ |
285 | pd = pmd_offset(pgd_offset_k(va), va); | 284 | pd = pmd_offset(pgd_offset_k(va), va); |
286 | /* Use middle 10 bits of VA to index the second-level map */ | 285 | /* Use middle 10 bits of VA to index the second-level map */ |
287 | pg = pte_alloc_kernel(&init_mm, pd, va); | 286 | pg = pte_alloc_kernel(pd, va); |
288 | if (pg != 0) { | 287 | if (pg != 0) { |
289 | err = 0; | 288 | err = 0; |
290 | set_pte_at(&init_mm, va, pg, pfn_pte(pa >> PAGE_SHIFT, __pgprot(flags))); | 289 | set_pte_at(&init_mm, va, pg, pfn_pte(pa >> PAGE_SHIFT, __pgprot(flags))); |
291 | if (mem_init_done) | 290 | if (mem_init_done) |
292 | flush_HPTE(0, va, pmd_val(*pd)); | 291 | flush_HPTE(0, va, pmd_val(*pd)); |
293 | } | 292 | } |
294 | spin_unlock(&init_mm.page_table_lock); | ||
295 | return err; | 293 | return err; |
296 | } | 294 | } |
297 | 295 | ||