From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Christoph Egger" Subject: [PATCH] Cleanup/fix virt_to_maddr Date: Wed, 24 Jan 2007 10:06:40 +0100 Message-ID: <200701241006.40587.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-00=_gGytFUPq7J9lof6" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --Boundary-00=_gGytFUPq7J9lof6 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi! Where virt_to_maddr() or __pa() is used, paddr_t is mostly expected rather unsigned long. This may fix random issues in PAE mode. Christoph --Boundary-00=_gGytFUPq7J9lof6 Content-Type: text/x-diff; charset=us-ascii; name=xen_paddr.diff Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=xen_paddr.diff diff -r bea505a69722 xen/include/asm-x86/page.h --- a/xen/include/asm-x86/page.h Tue Jan 23 15:58:05 2007 +0000 +++ b/xen/include/asm-x86/page.h Wed Jan 24 09:32:26 2007 +0100 @@ -222,7 +222,7 @@ typedef struct { u64 pfn; } pagetable_t; /* Convert between Xen-heap virtual addresses and machine addresses. */ #define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET) -#define virt_to_maddr(va) ((unsigned long)(va)-PAGE_OFFSET) +#define virt_to_maddr(va) ((paddr_t)(va)-PAGE_OFFSET) #define maddr_to_virt(ma) ((void *)((unsigned long)(ma)+PAGE_OFFSET)) /* Shorthand versions of the above functions. */ #define __pa(x) (virt_to_maddr(x)) --Boundary-00=_gGytFUPq7J9lof6 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --Boundary-00=_gGytFUPq7J9lof6--