[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] xen: arm: allow virt_to_maddr to take either a pointer or an integer



commit 530cef20c3c2b9c58e73d7a768665464f20653e7
Author:     Ian Campbell <ian.campbell@xxxxxxxxxx>
AuthorDate: Thu Aug 8 13:15:15 2013 +0100
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Tue Aug 20 15:44:36 2013 +0100

    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@xxxxxxxxxx>
    Acked-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
---
 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 baaf9c3..7aca836 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)
 {
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.