diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-10-30 01:58:18 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-10-30 01:58:18 -0500 |
commit | f0612bbc41f65f5a684f69d714a1a17a6f0f40c5 (patch) | |
tree | 8c070070bb355843cfa4635643e9da7c2c4cd44a /arch/frv/mm/dma-alloc.c | |
parent | b0c4e148bd591629749d02a8fbc8d81c26d548cf (diff) | |
parent | 81cfb8864c73230eb1c37753aba517db15cf4d8f (diff) |
Merge branch 'upstream'
Diffstat (limited to 'arch/frv/mm/dma-alloc.c')
-rw-r--r-- | arch/frv/mm/dma-alloc.c | 5 |
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 | ||