diff options
4 files changed, 30 insertions, 22 deletions
diff --git a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/maddr.h b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/maddr.h index 0f50556dd4..4ded6ed842 100644 --- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/maddr.h +++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/maddr.h @@ -153,23 +153,6 @@ static inline paddr_t pte_machine_to_phys(maddr_t machine) } #endif -#else /* !CONFIG_XEN */ - -#define pfn_to_mfn(pfn) (pfn) -#define mfn_to_pfn(mfn) (mfn) -#define mfn_to_local_pfn(mfn) (mfn) -#define set_phys_to_machine(pfn, mfn) ((void)0) -#define phys_to_machine_mapping_valid(pfn) (1) -#define phys_to_machine(phys) ((maddr_t)(phys)) -#define machine_to_phys(mach) ((paddr_t)(mach)) - -#endif /* !CONFIG_XEN */ - -/* VIRT <-> MACHINE conversion */ -#define virt_to_machine(v) (phys_to_machine(__pa(v))) -#define virt_to_mfn(v) (pfn_to_mfn(__pa(v) >> PAGE_SHIFT)) -#define mfn_to_virt(m) (__va(mfn_to_pfn(m) << PAGE_SHIFT)) - #ifdef CONFIG_X86_PAE static inline pte_t pfn_pte_ma(unsigned long page_nr, pgprot_t pgprot) { @@ -188,4 +171,23 @@ static inline pte_t pfn_pte_ma(unsigned long page_nr, pgprot_t pgprot) #define __pte_ma(x) ((pte_t) { (x) } ) +#else /* !CONFIG_XEN */ + +#define pfn_to_mfn(pfn) (pfn) +#define mfn_to_pfn(mfn) (mfn) +#define mfn_to_local_pfn(mfn) (mfn) +#define set_phys_to_machine(pfn, mfn) ((void)0) +#define phys_to_machine_mapping_valid(pfn) (1) +#define phys_to_machine(phys) ((maddr_t)(phys)) +#define machine_to_phys(mach) ((paddr_t)(mach)) +#define pfn_pte_ma(pfn, prot) pfn_pte(pfn, prot) +#define __pte_ma(x) __pte(x) + +#endif /* !CONFIG_XEN */ + +/* VIRT <-> MACHINE conversion */ +#define virt_to_machine(v) (phys_to_machine(__pa(v))) +#define virt_to_mfn(v) (pfn_to_mfn(__pa(v) >> PAGE_SHIFT)) +#define mfn_to_virt(m) (__va(mfn_to_pfn(m) << PAGE_SHIFT)) + #endif /* _I386_MADDR_H */ diff --git a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/maddr.h b/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/maddr.h index cefd6e0b61..0524e2cc2d 100644 --- a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/maddr.h +++ b/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/maddr.h @@ -135,6 +135,9 @@ static inline paddr_t pte_machine_to_phys(maddr_t machine) return phys; } +#define __pte_ma(x) ((pte_t) { (x) } ) +#define pfn_pte_ma(pfn, prot) __pte_ma((((pfn) << PAGE_SHIFT) | pgprot_val(prot)) & __supported_pte_mask) + #else /* !CONFIG_XEN */ #define pfn_to_mfn(pfn) (pfn) @@ -144,6 +147,8 @@ static inline paddr_t pte_machine_to_phys(maddr_t machine) #define phys_to_machine_mapping_valid(pfn) (1) #define phys_to_machine(phys) ((maddr_t)(phys)) #define machine_to_phys(mach) ((paddr_t)(mach)) +#define pfn_pte_ma(pfn, prot) pfn_pte(pfn, prot) +#define __pte_ma(x) __pte(x) #endif /* !CONFIG_XEN */ @@ -152,8 +157,5 @@ static inline paddr_t pte_machine_to_phys(maddr_t machine) #define virt_to_mfn(v) (pfn_to_mfn(__pa(v) >> PAGE_SHIFT)) #define mfn_to_virt(m) (__va(mfn_to_pfn(m) << PAGE_SHIFT)) -#define __pte_ma(x) ((pte_t) { (x) } ) -#define pfn_pte_ma(pfn, prot) __pte_ma((((pfn) << PAGE_SHIFT) | pgprot_val(prot)) & __supported_pte_mask) - #endif /* _X86_64_MADDR_H */ diff --git a/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h b/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h index f6a9371034..1f604a0e1a 100644 --- a/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h +++ b/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h @@ -96,6 +96,10 @@ extern char *kasprintf(gfp_t gfp, const char *fmt, ...) #define handle_sysrq(x,y,z) handle_sysrq(x,y) #endif +#if defined(_PAGE_PRESENT) && !defined(_PAGE_NX) +#define _PAGE_NX 0 +#endif + /* * This variable at present is referenced by netfront, but only in code that * is dead when running in hvm guests. To detect potential active uses of it diff --git a/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c b/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c index 8e69557ac8..2451b7c6ce 100644 --- a/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c +++ b/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c @@ -1,6 +1,6 @@ /****************************************************************************** - * evtchn-pci.c - * xen event channel fake PCI device driver + * platform-pci.c + * Xen platform PCI device driver * Copyright (C) 2005, Intel Corporation. * * This program is free software; you can redistribute it and/or modify it |