Skip to content

Commit

Permalink
ARM: dma-mapping: use PMD size for section unmap
Browse files Browse the repository at this point in the history
The dma_contiguous_remap() function clears existing section maps using
the wrong size (PGDIR_SIZE instead of PMD_SIZE).  This is a bug which
does not affect non-LPAE systems, where PGDIR_SIZE and PMD_SIZE are the same.
On LPAE systems, however, this bug causes the kernel to hang at this point.

This fix has been tested on both LPAE and non-LPAE kernel builds.

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
  • Loading branch information
Vitaly Andrianov authored and Marek Szyprowski committed May 21, 2012
1 parent 58f42fd commit 61f6c7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/mm/dma-mapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ void __init dma_contiguous_remap(void)
* Clear previous low-memory mapping
*/
for (addr = __phys_to_virt(start); addr < __phys_to_virt(end);
addr += PGDIR_SIZE)
addr += PMD_SIZE)
pmd_clear(pmd_off_k(addr));

iotable_init(&map, 1);
Expand Down

0 comments on commit 61f6c7a

Please sign in to comment.