[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] xen/mm: Align virtual address on PAGE_SIZE in iounmap
commit 73a6a932d6e927c4608a8726987a3e89545d7bee Author: Julien Grall <julien.grall@xxxxxxxxxx> AuthorDate: Fri May 10 17:22:16 2013 +0100 Commit: Ian Campbell <ian.campbell@xxxxxxxxxx> CommitDate: Mon May 13 11:59:43 2013 +0100 xen/mm: Align virtual address on PAGE_SIZE in iounmap ioremap function can unlikely return an unaligned virtual address if the physical address itself is unaligned on a page size. Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx> Acked-by: Jan Beulich <jbeulich@xxxxxxxx> Acked-by: Keir Fraser <keir@xxxxxxx> [ ijc -- include asm/page.h to fix build error on x86 ] --- xen/include/xen/vmap.h | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/xen/include/xen/vmap.h b/xen/include/xen/vmap.h index 88e5d99..b1923dd 100644 --- a/xen/include/xen/vmap.h +++ b/xen/include/xen/vmap.h @@ -2,6 +2,7 @@ #define __XEN_VMAP_H__ #include <xen/types.h> +#include <asm/page.h> void *vm_alloc(unsigned int nr, unsigned int align); void vm_free(const void *); @@ -15,7 +16,9 @@ void __iomem *ioremap(paddr_t, size_t); static inline void iounmap(void __iomem *va) { - vunmap((void __force *)va); + unsigned long addr = (unsigned long)(void __force *)va; + + vunmap((void *)(addr & PAGE_MASK)); } void vm_init(void); -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |