direct-io.hg

changeset 10403:912588576817

[IA64] Define mfn_to_local_pfn()

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
author awilliam@xenbuild.aw
date Tue Jun 13 11:41:05 2006 -0600 (2006-06-13)
parents 942ecf21dc06
children e74c47d073ee
files linux-2.6-xen-sparse/include/asm-ia64/page.h
line diff
     1.1 --- a/linux-2.6-xen-sparse/include/asm-ia64/page.h	Tue Jun 13 09:35:43 2006 -0600
     1.2 +++ b/linux-2.6-xen-sparse/include/asm-ia64/page.h	Tue Jun 13 11:41:05 2006 -0600
     1.3 @@ -325,6 +325,16 @@ machine_to_phys_for_dma(unsigned long ma
     1.4  #define virt_to_mfn(virt)		(__pa(virt) >> PAGE_SHIFT)
     1.5  #define virt_to_machine(virt)		__pa(virt) // for tpmfront.c
     1.6  
     1.7 +static inline unsigned long
     1.8 +mfn_to_local_pfn(unsigned long mfn)
     1.9 +{
    1.10 +	extern unsigned long max_mapnr;
    1.11 +	unsigned long pfn = mfn_to_pfn(mfn);
    1.12 +	if (!pfn_valid(pfn))
    1.13 +		return INVALID_P2M_ENTRY;
    1.14 +	return pfn;
    1.15 +}
    1.16 +
    1.17  #endif /* CONFIG_XEN_IA64_DOM0_VP */
    1.18  #endif /* CONFIG_XEN */
    1.19  #endif /* __ASSEMBLY__ */