]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ARM: LPAE: Use unsigned long for __phys_to_virt and __virt_to_phys
authorCatalin Marinas <catalin.marinas@arm.com>
Sat, 7 May 2011 22:22:48 +0000 (23:22 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Tue, 14 Jun 2011 13:43:56 +0000 (14:43 +0100)
commitfcf79ce12da745e3f1e0037446c953cfbe70cd77
tree852fcf2c75142c14f2fdc0b5d71ffb95e82f71cc
parent9ceec7231360cb63e72607b943dd60d232eb87a4
ARM: LPAE: Use unsigned long for __phys_to_virt and __virt_to_phys

The !CONFIG_ARM_PATCH_PHYS_VIRT case uses macros for __phys_to_virt and
__virt_to_phys but does not use any type casting. This causes compiler
warnings with LPAE where the phys_addr_t and dma_addr_t are 64-bit:

  CC      arch/arm/mm/dma-mapping.o
In file included from /work/Linux/linux-marc/include/linux/dma-mapping.h:93:0,
                 from /work/Linux/linux-marc/arch/arm/mm/dma-mapping.c:19:
/work/Linux/linux-marc/arch/arm/include/asm/dma-mapping.h: In function 'dma_to_virt':
/work/Linux/linux-marc/arch/arm/include/asm/dma-mapping.h:35:9: warning:
        cast to pointer from integer of different size

Note that these macros are only valid for lowmem physical addresses
where the range is within 32-bit address range.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm/include/asm/memory.h