From: Keir Fraser Date: Wed, 3 Dec 2008 11:38:36 +0000 (+0000) Subject: x86: Fix mfn_to_virt() to cast MFN to address size. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14040^2~7 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=964960aa1888126a9486e33862ce85de331b970b;p=xen.git x86: Fix mfn_to_virt() to cast MFN to address size. Signed-off-by: Keir Fraser --- diff --git a/xen/include/asm-x86/page.h b/xen/include/asm-x86/page.h index 9ccfdb8502..a58a750d07 100644 --- a/xen/include/asm-x86/page.h +++ b/xen/include/asm-x86/page.h @@ -228,7 +228,7 @@ void copy_page_sse2(void *, const void *); /* Convert between Xen-heap virtual addresses and machine frame numbers. */ #define virt_to_mfn(va) (virt_to_maddr(va) >> PAGE_SHIFT) -#define mfn_to_virt(mfn) (maddr_to_virt(mfn << PAGE_SHIFT)) +#define mfn_to_virt(mfn) (maddr_to_virt((paddr_t)(mfn) << PAGE_SHIFT)) /* Convert between machine frame numbers and page-info structures. */ #define mfn_to_page(mfn) (frame_table + (mfn))