All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Cleanup/fix virt_to_maddr
@ 2007-01-24  9:06 Christoph Egger
  2007-01-24 10:48 ` Keir Fraser
  0 siblings, 1 reply; 4+ messages in thread
From: Christoph Egger @ 2007-01-24  9:06 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 148 bytes --]



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

[-- Attachment #2: xen_paddr.diff --]
[-- Type: text/x-diff, Size: 663 bytes --]

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))

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-01-24 11:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-24  9:06 [PATCH] Cleanup/fix virt_to_maddr Christoph Egger
2007-01-24 10:48 ` Keir Fraser
2007-01-24 11:01   ` Christoph Egger
2007-01-24 11:06     ` Keir Fraser

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.