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>
This commit is contained in:
parent
1c8a7c1fbf
commit
53cbcbcf43
1 changed files with 1 additions and 1 deletions
|
@ -168,7 +168,7 @@ static int __init consistent_init(void)
|
|||
pte_t *pte;
|
||||
int i = 0;
|
||||
unsigned long base = consistent_base;
|
||||
unsigned long num_ptes = (CONSISTENT_END - base) >> PGDIR_SHIFT;
|
||||
unsigned long num_ptes = (CONSISTENT_END - base) >> PMD_SHIFT;
|
||||
|
||||
consistent_pte = kmalloc(num_ptes * sizeof(pte_t), GFP_KERNEL);
|
||||
if (!consistent_pte) {
|
||||
|
|
Loading…
Reference in a new issue