From: Tim Deegan Date: Thu, 17 May 2012 09:24:54 +0000 (+0100) Subject: x86/p2m, arm/p2m: remove get_gfn_untyped(). X-Git-Tag: 4.2.0-rc1~328 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=183a0b54df6e1192bee31d23ff74453e3c9d2839;p=xen.git x86/p2m, arm/p2m: remove get_gfn_untyped(). Adjust its only user to use get_gfn. Signed-off-by: Andres Lagar-Cavilla Signed-off-by: Tim Deegan Acked-by: Ian Campbell --- diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index f65d40fac4..ac414d1b7c 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -4524,6 +4524,7 @@ static int xenmem_add_to_physmap_once( unsigned long gfn = 0; /* gcc ... */ unsigned long prev_mfn, mfn = 0, gpfn, idx; int rc; + p2m_type_t p2mt; switch ( xatp->space ) { @@ -4596,7 +4597,7 @@ static int xenmem_add_to_physmap_once( put_page(page); /* Remove previously mapped page if it was present. */ - prev_mfn = get_gfn_untyped(d, xatp->gpfn); + prev_mfn = mfn_x(get_gfn(d, xatp->gpfn, &p2mt)); if ( mfn_valid(prev_mfn) ) { if ( is_xen_heap_mfn(prev_mfn) ) diff --git a/xen/include/asm-arm/p2m.h b/xen/include/asm-arm/p2m.h index 6bcdf02b79..d88e7a9e9f 100644 --- a/xen/include/asm-arm/p2m.h +++ b/xen/include/asm-arm/p2m.h @@ -75,12 +75,6 @@ static inline struct page_info *get_page_from_gfn( return page; } -/* Compatibility function exporting the old untyped interface */ -static inline unsigned long get_gfn_untyped(struct domain *d, unsigned long gpfn) -{ - return gmfn_to_mfn(d, gpfn); -} - int get_page_type(struct page_info *page, unsigned long type); int is_iomem_page(unsigned long mfn); static inline int get_page_and_type(struct page_info *page, diff --git a/xen/include/asm-x86/p2m.h b/xen/include/asm-x86/p2m.h index 48e3bad23e..94bd136168 100644 --- a/xen/include/asm-x86/p2m.h +++ b/xen/include/asm-x86/p2m.h @@ -339,17 +339,6 @@ static inline mfn_t get_gfn_type(struct domain *d, #define get_gfn_unshare(d, g, t) get_gfn_type((d), (g), (t), \ P2M_ALLOC | P2M_UNSHARE) -/* Compatibility function exporting the old untyped interface */ -static inline unsigned long get_gfn_untyped(struct domain *d, unsigned long gpfn) -{ - mfn_t mfn; - p2m_type_t t; - mfn = get_gfn(d, gpfn, &t); - if ( p2m_is_valid(t) ) - return mfn_x(mfn); - return INVALID_MFN; -} - /* Will release the p2m_lock for this gfn entry. */ void __put_gfn(struct p2m_domain *p2m, unsigned long gfn);