diff options
Diffstat (limited to 'linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/maddr.h')
-rw-r--r-- | linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/maddr.h | 36 |
1 files changed, 19 insertions, 17 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 */ |