aboutsummaryrefslogtreecommitdiffstats
path: root/arch/frv/mm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/frv/mm')
-rw-r--r--arch/frv/mm/dma-alloc.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/frv/mm/dma-alloc.c b/arch/frv/mm/dma-alloc.c
index cfc4f97490c6..342823aad758 100644
--- a/arch/frv/mm/dma-alloc.c
+++ b/arch/frv/mm/dma-alloc.c
@@ -55,21 +55,18 @@ static int map_page(unsigned long va, unsigned long pa, pgprot_t prot)
55 pte_t *pte; 55 pte_t *pte;
56 int err = -ENOMEM; 56 int err = -ENOMEM;
57 57
58 spin_lock(&init_mm.page_table_lock);
59
60 /* Use upper 10 bits of VA to index the first level map */ 58 /* Use upper 10 bits of VA to index the first level map */
61 pge = pgd_offset_k(va); 59 pge = pgd_offset_k(va);
62 pue = pud_offset(pge, va); 60 pue = pud_offset(pge, va);
63 pme = pmd_offset(pue, va); 61 pme = pmd_offset(pue, va);
64 62
65 /* Use middle 10 bits of VA to index the second-level map */ 63 /* Use middle 10 bits of VA to index the second-level map */
66 pte = pte_alloc_kernel(&init_mm, pme, va); 64 pte = pte_alloc_kernel(pme, va);
67 if (pte != 0) { 65 if (pte != 0) {
68 err = 0; 66 err = 0;
69 set_pte(pte, mk_pte_phys(pa & PAGE_MASK, prot)); 67 set_pte(pte, mk_pte_phys(pa & PAGE_MASK, prot));
70 } 68 }
71 69
72 spin_unlock(&init_mm.page_table_lock);
73 return err; 70 return err;
74} 71}
75 72