diff options
Diffstat (limited to 'arch/arm/mm/consistent.c')
-rw-r--r-- | arch/arm/mm/consistent.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/arch/arm/mm/consistent.c b/arch/arm/mm/consistent.c index 26356ce4da54..47b0b767f080 100644 --- a/arch/arm/mm/consistent.c +++ b/arch/arm/mm/consistent.c | |||
@@ -75,7 +75,7 @@ static struct vm_region consistent_head = { | |||
75 | }; | 75 | }; |
76 | 76 | ||
77 | static struct vm_region * | 77 | static struct vm_region * |
78 | vm_region_alloc(struct vm_region *head, size_t size, int gfp) | 78 | vm_region_alloc(struct vm_region *head, size_t size, gfp_t gfp) |
79 | { | 79 | { |
80 | unsigned long addr = head->vm_start, end = head->vm_end - size; | 80 | unsigned long addr = head->vm_start, end = head->vm_end - size; |
81 | unsigned long flags; | 81 | unsigned long flags; |
@@ -133,7 +133,7 @@ static struct vm_region *vm_region_find(struct vm_region *head, unsigned long ad | |||
133 | #endif | 133 | #endif |
134 | 134 | ||
135 | static void * | 135 | static void * |
136 | __dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, int gfp, | 136 | __dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp, |
137 | pgprot_t prot) | 137 | pgprot_t prot) |
138 | { | 138 | { |
139 | struct page *page; | 139 | struct page *page; |
@@ -251,7 +251,7 @@ __dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, int gfp, | |||
251 | * virtual and bus address for that space. | 251 | * virtual and bus address for that space. |
252 | */ | 252 | */ |
253 | void * | 253 | void * |
254 | dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *handle, int gfp) | 254 | dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp) |
255 | { | 255 | { |
256 | return __dma_alloc(dev, size, handle, gfp, | 256 | return __dma_alloc(dev, size, handle, gfp, |
257 | pgprot_noncached(pgprot_kernel)); | 257 | pgprot_noncached(pgprot_kernel)); |
@@ -263,7 +263,7 @@ EXPORT_SYMBOL(dma_alloc_coherent); | |||
263 | * dma_alloc_coherent above. | 263 | * dma_alloc_coherent above. |
264 | */ | 264 | */ |
265 | void * | 265 | void * |
266 | dma_alloc_writecombine(struct device *dev, size_t size, dma_addr_t *handle, int gfp) | 266 | dma_alloc_writecombine(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp) |
267 | { | 267 | { |
268 | return __dma_alloc(dev, size, handle, gfp, | 268 | return __dma_alloc(dev, size, handle, gfp, |
269 | pgprot_writecombine(pgprot_kernel)); | 269 | pgprot_writecombine(pgprot_kernel)); |
@@ -397,8 +397,6 @@ static int __init consistent_init(void) | |||
397 | pte_t *pte; | 397 | pte_t *pte; |
398 | int ret = 0; | 398 | int ret = 0; |
399 | 399 | ||
400 | spin_lock(&init_mm.page_table_lock); | ||
401 | |||
402 | do { | 400 | do { |
403 | pgd = pgd_offset(&init_mm, CONSISTENT_BASE); | 401 | pgd = pgd_offset(&init_mm, CONSISTENT_BASE); |
404 | pmd = pmd_alloc(&init_mm, pgd, CONSISTENT_BASE); | 402 | pmd = pmd_alloc(&init_mm, pgd, CONSISTENT_BASE); |
@@ -409,7 +407,7 @@ static int __init consistent_init(void) | |||
409 | } | 407 | } |
410 | WARN_ON(!pmd_none(*pmd)); | 408 | WARN_ON(!pmd_none(*pmd)); |
411 | 409 | ||
412 | pte = pte_alloc_kernel(&init_mm, pmd, CONSISTENT_BASE); | 410 | pte = pte_alloc_kernel(pmd, CONSISTENT_BASE); |
413 | if (!pte) { | 411 | if (!pte) { |
414 | printk(KERN_ERR "%s: no pte tables\n", __func__); | 412 | printk(KERN_ERR "%s: no pte tables\n", __func__); |
415 | ret = -ENOMEM; | 413 | ret = -ENOMEM; |
@@ -419,8 +417,6 @@ static int __init consistent_init(void) | |||
419 | consistent_pte = pte; | 417 | consistent_pte = pte; |
420 | } while (0); | 418 | } while (0); |
421 | 419 | ||
422 | spin_unlock(&init_mm.page_table_lock); | ||
423 | |||
424 | return ret; | 420 | return ret; |
425 | } | 421 | } |
426 | 422 | ||