diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2011-11-17 07:11:21 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-11-21 08:12:19 -0500 |
commit | 53cbcbcf4362ef39e0a692b1d23c395999397fca (patch) | |
tree | 0c87a7dff39ad967140ab6eb1f1e7a02ad30b57b /arch/arm/mm | |
parent | 1c8a7c1fbfc7ae2362d26559df26b99c806b68b5 (diff) |
ARM: 7166/1: Use PMD_SHIFT instead of PGDIR_SHIFT in dma-consistent.c
Commit 99d1717d (ARM: Add init_consistent_dma_size()) introduces dynamic
allocation of the consistent_pte array. The number of PTEs should be
calculated based on the number of PMD entries rather than PGD, hence the
PMD_SHIFT.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Jon Medhurst <tixy@yxit.co.uk>
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm')
-rw-r--r-- | arch/arm/mm/dma-mapping.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index e4e7f6cba1ab..ab584569930e 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c | |||
@@ -168,7 +168,7 @@ static int __init consistent_init(void) | |||
168 | pte_t *pte; | 168 | pte_t *pte; |
169 | int i = 0; | 169 | int i = 0; |
170 | unsigned long base = consistent_base; | 170 | unsigned long base = consistent_base; |
171 | unsigned long num_ptes = (CONSISTENT_END - base) >> PGDIR_SHIFT; | 171 | unsigned long num_ptes = (CONSISTENT_END - base) >> PMD_SHIFT; |
172 | 172 | ||
173 | consistent_pte = kmalloc(num_ptes * sizeof(pte_t), GFP_KERNEL); | 173 | consistent_pte = kmalloc(num_ptes * sizeof(pte_t), GFP_KERNEL); |
174 | if (!consistent_pte) { | 174 | if (!consistent_pte) { |