]> xenbits.xensource.com Git - legacy/linux-2.6.18-xen.git/commitdiff
xen/usb: force proper address translation in USB monitor
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 22 Sep 2009 07:04:07 +0000 (08:04 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 22 Sep 2009 07:04:07 +0000 (08:04 +0100)
Signed-off-by: Jan Beulich <jbeulich@novell.com>
drivers/usb/mon/mon_dma.c

index ddcfc01e77a022918940d725986ff0061591f6cb..8011967c1eb50ad3016908be4928d67faea7b7e8 100644 (file)
 #if defined(__i386__) || defined(__x86_64__) /* CONFIG_ARCH_I386 doesn't exit */
 #define MON_HAS_UNMAP 1
 
+#ifndef CONFIG_XEN
 #define phys_to_page(phys)     pfn_to_page((phys) >> PAGE_SHIFT)
+#else
+#define phys_to_page(phys)     pfn_to_page(mfn_to_local_pfn((phys) >> PAGE_SHIFT))
+#endif
 
 char mon_dmapeek(unsigned char *dst, dma_addr_t dma_addr, int len)
 {