Skip to content

Commit

Permalink
ARM: dma: use phys_addr_t in __dma_page_[cpu_to_dev/dev_to_cpu]
Browse files Browse the repository at this point in the history
On a 32 bit ARM architecture with LPAE extension physical addresses
cannot fit into unsigned long variable.

So fix it by using phys_addr_t instead of unsigned long.

Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
  • Loading branch information
Santosh Shilimkar committed May 7, 2014
1 parent 812b99e commit 2161c24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/arm/mm/dma-mapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ static void dma_cache_maint_page(struct page *page, unsigned long offset,
static void __dma_page_cpu_to_dev(struct page *page, unsigned long off,
size_t size, enum dma_data_direction dir)
{
unsigned long paddr;
phys_addr_t paddr;

dma_cache_maint_page(page, off, size, dir, dmac_map_area);

Expand All @@ -901,7 +901,7 @@ static void __dma_page_cpu_to_dev(struct page *page, unsigned long off,
static void __dma_page_dev_to_cpu(struct page *page, unsigned long off,
size_t size, enum dma_data_direction dir)
{
unsigned long paddr = page_to_phys(page) + off;
phys_addr_t paddr = page_to_phys(page) + off;

/* FIXME: non-speculating: not required */
/* don't bother invalidating if DMA to device */
Expand Down

0 comments on commit 2161c24

Please sign in to comment.