direct-io.hg

changeset 11327:36b76e551456

[IA64] PV-to-HVM prep for maddr.h

Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
[merged with existing maddr.h]
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
author awilliam@xenbuild.aw
date Wed Aug 23 12:56:10 2006 -0600 (2006-08-23)
parents 7aaab04fd22e
children 66c27919578f
files linux-2.6-xen-sparse/include/asm-ia64/maddr.h
line diff
     1.1 --- a/linux-2.6-xen-sparse/include/asm-ia64/maddr.h	Wed Aug 23 11:16:41 2006 -0600
     1.2 +++ b/linux-2.6-xen-sparse/include/asm-ia64/maddr.h	Wed Aug 23 12:56:10 2006 -0600
     1.3 @@ -1,19 +1,16 @@
     1.4  #ifndef _ASM_IA64_MADDR_H
     1.5  #define _ASM_IA64_MADDR_H
     1.6  
     1.7 -#ifndef __ASSEMBLY__
     1.8 -#ifdef CONFIG_XEN
     1.9 -
    1.10 -#define INVALID_P2M_ENTRY	(~0UL)
    1.11 -
    1.12  #include <linux/kernel.h>
    1.13  #include <asm/hypervisor.h>
    1.14 -#include <xen/features.h>	// to compile netback, netfront
    1.15 -typedef unsigned long maddr_t;	// to compile netback, netfront
    1.16 +#include <xen/features.h>
    1.17 +#include <xen/interface/xen.h>
    1.18  
    1.19 +#ifdef CONFIG_XEN
    1.20 +
    1.21 +#define INVALID_P2M_ENTRY       (~0UL)
    1.22  
    1.23  /* XXX xen page size != page size */
    1.24 -
    1.25  static inline unsigned long
    1.26  pfn_to_mfn_for_dma(unsigned long pfn)
    1.27  {
    1.28 @@ -53,18 +50,6 @@ machine_to_phys_for_dma(unsigned long ma
    1.29  	return phys;
    1.30  }
    1.31  
    1.32 -#define set_phys_to_machine(pfn, mfn) do { } while (0)
    1.33 -#define xen_machphys_update(mfn, pfn) do { } while (0)
    1.34 -
    1.35 -/* XXX to compile set_phys_to_machine(vaddr, FOREIGN_FRAME(m)) */
    1.36 -#define FOREIGN_FRAME(m)        (INVALID_P2M_ENTRY)
    1.37 -
    1.38 -#define mfn_to_pfn(mfn)			(mfn)
    1.39 -#define mfn_to_virt(mfn)		(__va((mfn) << PAGE_SHIFT))
    1.40 -#define pfn_to_mfn(pfn)			(pfn)
    1.41 -#define virt_to_mfn(virt)		(__pa(virt) >> PAGE_SHIFT)
    1.42 -#define virt_to_machine(virt)		__pa(virt) // for tpmfront.c
    1.43 -
    1.44  static inline unsigned long
    1.45  mfn_to_local_pfn(unsigned long mfn)
    1.46  {
    1.47 @@ -75,7 +60,29 @@ mfn_to_local_pfn(unsigned long mfn)
    1.48  	return pfn;
    1.49  }
    1.50  
    1.51 -#endif /* CONFIG_XEN */
    1.52 -#endif /* __ASSEMBLY__ */
    1.53 +#else /* !CONFIG_XEN */
    1.54 +
    1.55 +#define pfn_to_mfn_for_dma(pfn) (pfn)
    1.56 +#define mfn_to_pfn_for_dma(mfn) (mfn)
    1.57 +#define phys_to_machine_for_dma(phys) (phys)
    1.58 +#define machine_to_phys_for_dma(machine) (machine)
    1.59 +#define mfn_to_local_pfn(mfn) (mfn)
    1.60 +
    1.61 +#endif /* !CONFIG_XEN */
    1.62 +
    1.63 +/* XXX to compile set_phys_to_machine(vaddr, FOREIGN_FRAME(m)) */
    1.64 +#define FOREIGN_FRAME(m)        (INVALID_P2M_ENTRY)
    1.65 +
    1.66 +#define mfn_to_pfn(mfn) (mfn)
    1.67 +#define pfn_to_mfn(pfn) (pfn)
    1.68 +
    1.69 +#define mfn_to_virt(mfn) (__va((mfn) << PAGE_SHIFT))
    1.70 +#define virt_to_mfn(virt) (__pa(virt) >> PAGE_SHIFT)
    1.71 +#define virt_to_machine(virt) __pa(virt) // for tpmfront.c
    1.72 +
    1.73 +#define set_phys_to_machine(pfn, mfn) do { } while (0)
    1.74 +#define xen_machphys_update(mfn, pfn) do { } while (0)
    1.75 +
    1.76 +typedef unsigned long maddr_t;	// to compile netback, netfront
    1.77  
    1.78  #endif /* _ASM_IA64_MADDR_H */