From: awilliam@xenbuild.aw Date: Wed, 23 Aug 2006 18:56:10 +0000 (-0600) Subject: [IA64] PV-to-HVM prep for maddr.h X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15704 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=0bbee1ed751608f2be6b2f71c59cffad226f61e1;p=xen.git [IA64] PV-to-HVM prep for maddr.h Signed-off-by: Tsunehisa Doi Signed-off-by: Tomonari Horikoshi [merged with existing maddr.h] Signed-off-by: Alex Williamson --- diff --git a/linux-2.6-xen-sparse/include/asm-ia64/maddr.h b/linux-2.6-xen-sparse/include/asm-ia64/maddr.h index dbff05b338..d80345b9b9 100644 --- a/linux-2.6-xen-sparse/include/asm-ia64/maddr.h +++ b/linux-2.6-xen-sparse/include/asm-ia64/maddr.h @@ -1,19 +1,16 @@ #ifndef _ASM_IA64_MADDR_H #define _ASM_IA64_MADDR_H -#ifndef __ASSEMBLY__ -#ifdef CONFIG_XEN - -#define INVALID_P2M_ENTRY (~0UL) - #include #include -#include // to compile netback, netfront -typedef unsigned long maddr_t; // to compile netback, netfront +#include +#include +#ifdef CONFIG_XEN -/* XXX xen page size != page size */ +#define INVALID_P2M_ENTRY (~0UL) +/* XXX xen page size != page size */ static inline unsigned long pfn_to_mfn_for_dma(unsigned long pfn) { @@ -53,18 +50,6 @@ machine_to_phys_for_dma(unsigned long machine) return phys; } -#define set_phys_to_machine(pfn, mfn) do { } while (0) -#define xen_machphys_update(mfn, pfn) do { } while (0) - -/* XXX to compile set_phys_to_machine(vaddr, FOREIGN_FRAME(m)) */ -#define FOREIGN_FRAME(m) (INVALID_P2M_ENTRY) - -#define mfn_to_pfn(mfn) (mfn) -#define mfn_to_virt(mfn) (__va((mfn) << PAGE_SHIFT)) -#define pfn_to_mfn(pfn) (pfn) -#define virt_to_mfn(virt) (__pa(virt) >> PAGE_SHIFT) -#define virt_to_machine(virt) __pa(virt) // for tpmfront.c - static inline unsigned long mfn_to_local_pfn(unsigned long mfn) { @@ -75,7 +60,29 @@ mfn_to_local_pfn(unsigned long mfn) return pfn; } -#endif /* CONFIG_XEN */ -#endif /* __ASSEMBLY__ */ +#else /* !CONFIG_XEN */ + +#define pfn_to_mfn_for_dma(pfn) (pfn) +#define mfn_to_pfn_for_dma(mfn) (mfn) +#define phys_to_machine_for_dma(phys) (phys) +#define machine_to_phys_for_dma(machine) (machine) +#define mfn_to_local_pfn(mfn) (mfn) + +#endif /* !CONFIG_XEN */ + +/* XXX to compile set_phys_to_machine(vaddr, FOREIGN_FRAME(m)) */ +#define FOREIGN_FRAME(m) (INVALID_P2M_ENTRY) + +#define mfn_to_pfn(mfn) (mfn) +#define pfn_to_mfn(pfn) (pfn) + +#define mfn_to_virt(mfn) (__va((mfn) << PAGE_SHIFT)) +#define virt_to_mfn(virt) (__pa(virt) >> PAGE_SHIFT) +#define virt_to_machine(virt) __pa(virt) // for tpmfront.c + +#define set_phys_to_machine(pfn, mfn) do { } while (0) +#define xen_machphys_update(mfn, pfn) do { } while (0) + +typedef unsigned long maddr_t; // to compile netback, netfront #endif /* _ASM_IA64_MADDR_H */