ia64/xen-unstable
changeset 18632:7db30bf36b0e
[IA64] make virt_to_maddr() to support both cached/uncached identity mapped area.
The significant 8 bits of va are used by Xen,
such as 0xf2 is used as uncache mapping.
In function ioports_permit_access,
mach_start = mmio_start | __pa(space->mmio_base);
Mach_start gets wrong physical address.
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
The significant 8 bits of va are used by Xen,
such as 0xf2 is used as uncache mapping.
In function ioports_permit_access,
mach_start = mmio_start | __pa(space->mmio_base);
Mach_start gets wrong physical address.
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
author | Isaku Yamahata <yamahata@valinux.co.jp> |
---|---|
date | Fri Oct 17 15:33:03 2008 +0900 (2008-10-17) |
parents | 5450b008afce |
children | f27787b9f8d7 |
files | xen/include/asm-ia64/linux-xen/asm/pgtable.h xen/include/asm-ia64/xenpage.h |
line diff
1.1 --- a/xen/include/asm-ia64/linux-xen/asm/pgtable.h Thu Oct 16 11:33:05 2008 +0900 1.2 +++ b/xen/include/asm-ia64/linux-xen/asm/pgtable.h Fri Oct 17 15:33:03 2008 +0900 1.3 @@ -20,12 +20,15 @@ 1.4 #include <asm/system.h> 1.5 #include <asm/types.h> 1.6 #ifdef XEN 1.7 +#include <asm/xenpage.h> 1.8 #ifndef __ASSEMBLY__ 1.9 #include <xen/sched.h> /* needed for mm_struct (via asm/domain.h) */ 1.10 #endif 1.11 #endif 1.12 1.13 +#ifndef XEN 1.14 #define IA64_MAX_PHYS_BITS 50 /* max. number of physical address bits (architected) */ 1.15 +#endif 1.16 1.17 /* 1.18 * First, define the various bits in a PTE. Note that the PTE format
2.1 --- a/xen/include/asm-ia64/xenpage.h Thu Oct 16 11:33:05 2008 +0900 2.2 +++ b/xen/include/asm-ia64/xenpage.h Fri Oct 17 15:33:03 2008 +0900 2.3 @@ -1,6 +1,9 @@ 2.4 #ifndef _ASM_IA64_XENPAGE_H 2.5 #define _ASM_IA64_XENPAGE_H 2.6 2.7 +/* moved from xen/include/asm-ia64/linux-xen/asm/pgtable.h to compile */ 2.8 +#define IA64_MAX_PHYS_BITS 50 /* max. number of physical address bits (architected) */ 2.9 + 2.10 #ifndef __ASSEMBLY__ 2.11 #undef mfn_valid 2.12 #undef page_to_mfn 2.13 @@ -23,7 +26,12 @@ static inline unsigned long __virt_to_ma 2.14 if (va - KERNEL_START < xenheap_size) 2.15 return xen_pstart + (va - KERNEL_START); 2.16 else 2.17 - return (va & ((1UL << 60) - 1)); 2.18 + /* 2.19 + * Because the significant 8 bits of VA are used by Xen, 2.20 + * and xen uses cached/uncached identity mapping. 2.21 + * IA64_MAX_PHYS_BITS can't be larger than 56 2.22 + */ 2.23 + return (va & ((1UL << IA64_MAX_PHYS_BITS) - 1)); 2.24 } 2.25 2.26 #define virt_to_maddr(va) (__virt_to_maddr((unsigned long)va))