diff options
author | Ian Campbell <ian.campbell@citrix.com> | 2013-08-08 13:15:15 +0100 |
---|---|---|
committer | Ian Campbell <ian.campbell@citrix.com> | 2013-08-20 15:44:36 +0100 |
commit | 530cef20c3c2b9c58e73d7a768665464f20653e7 (patch) | |
tree | 8cafca7e05172bc356b5d658ca773e505911389c /xen/include/asm-arm | |
parent | 8b36092b02e036088420ba9056afb447a90120e6 (diff) | |
download | xen-530cef20c3c2b9c58e73d7a768665464f20653e7.tar.gz xen-530cef20c3c2b9c58e73d7a768665464f20653e7.tar.bz2 xen-530cef20c3c2b9c58e73d7a768665464f20653e7.zip |
xen: arm: allow virt_to_maddr to take either a pointer or an integer
This seems to be expected by common code which passes both pointers and
unsigned long as virtual addresses. The latter case in particular is in
init_node_heap() under a DIRECTMAP_VIRT_END #ifdef, which is why it hasn't
affected us yet (but will in a subsequent patch).
The new prototypes match the x86 versions apart from using vaddr_t instead of
unsigned long.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Diffstat (limited to 'xen/include/asm-arm')
-rw-r--r-- | xen/include/asm-arm/mm.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/xen/include/asm-arm/mm.h b/xen/include/asm-arm/mm.h index baaf9c3833..7aca8364f6 100644 --- a/xen/include/asm-arm/mm.h +++ b/xen/include/asm-arm/mm.h @@ -208,11 +208,12 @@ static inline void __iomem *ioremap_wc(paddr_t start, size_t len) #define paddr_to_pdx(pa) pfn_to_pdx(paddr_to_pfn(pa)) -static inline paddr_t virt_to_maddr(const void *va) +static inline paddr_t __virt_to_maddr(vaddr_t va) { - uint64_t par = va_to_par((vaddr_t)va); - return (par & PADDR_MASK & PAGE_MASK) | ((vaddr_t) va & ~PAGE_MASK); + uint64_t par = va_to_par(va); + return (par & PADDR_MASK & PAGE_MASK) | (va & ~PAGE_MASK); } +#define virt_to_maddr(va) __virt_to_maddr((vaddr_t)(va)) static inline void *maddr_to_virt(paddr_t ma) { |