Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Xen: Devel

[PATCH 11 of 11] x86/p2m, arm/p2m: remove get_gfn_untyped()

 

 

Xen devel RSS feed   Index | Next | Previous | View Threaded


tim at xen

May 10, 2012, 7:59 AM

Post #1 of 2 (85 views)
Permalink
[PATCH 11 of 11] x86/p2m, arm/p2m: remove get_gfn_untyped()

# HG changeset patch
# User Tim Deegan <tim [at] xen>
# Date 1336661656 -3600
# Node ID d95f0fb6c358f7e2624d317da6e405e8d733603a
# Parent 65768e16352c6bb0e11bb6c661da5137e99ecceb
x86/p2m, arm/p2m: remove get_gfn_untyped().

Adjust its only user to use get_gfn.

Signed-off-by: Andres Lagar-Cavilla <andres [at] lagarcavilla>
Signed-off-by: Tim Deegan <tim [at] xen>

diff -r 65768e16352c -r d95f0fb6c358 xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c Thu May 10 15:54:16 2012 +0100
+++ b/xen/arch/x86/mm.c Thu May 10 15:54:16 2012 +0100
@@ -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 -r 65768e16352c -r d95f0fb6c358 xen/include/asm-arm/p2m.h
--- a/xen/include/asm-arm/p2m.h Thu May 10 15:54:16 2012 +0100
+++ b/xen/include/asm-arm/p2m.h Thu May 10 15:54:16 2012 +0100
@@ -75,12 +75,6 @@ static inline struct page_info *get_page
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 -r 65768e16352c -r d95f0fb6c358 xen/include/asm-x86/p2m.h
--- a/xen/include/asm-x86/p2m.h Thu May 10 15:54:16 2012 +0100
+++ b/xen/include/asm-x86/p2m.h Thu May 10 15:54:16 2012 +0100
@@ -339,17 +339,6 @@ static inline mfn_t get_gfn_type(struct
#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);


_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


Ian.Campbell at citrix

May 10, 2012, 8:24 AM

Post #2 of 2 (82 views)
Permalink
Re: [PATCH 11 of 11] x86/p2m, arm/p2m: remove get_gfn_untyped() [In reply to]

On Thu, 2012-05-10 at 15:59 +0100, Tim Deegan wrote:
> # HG changeset patch
> # User Tim Deegan <tim [at] xen>
> # Date 1336661656 -3600
> # Node ID d95f0fb6c358f7e2624d317da6e405e8d733603a
> # Parent 65768e16352c6bb0e11bb6c661da5137e99ecceb
> x86/p2m, arm/p2m: remove get_gfn_untyped().
>
> Adjust its only user to use get_gfn.
>
> Signed-off-by: Andres Lagar-Cavilla <andres [at] lagarcavilla>
> Signed-off-by: Tim Deegan <tim [at] xen>

(trivial) ARM bit:
Acked-by: Ian Campbell <ian.campbell [at] citrix>

>
> diff -r 65768e16352c -r d95f0fb6c358 xen/arch/x86/mm.c
> --- a/xen/arch/x86/mm.c Thu May 10 15:54:16 2012 +0100
> +++ b/xen/arch/x86/mm.c Thu May 10 15:54:16 2012 +0100
> @@ -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 -r 65768e16352c -r d95f0fb6c358 xen/include/asm-arm/p2m.h
> --- a/xen/include/asm-arm/p2m.h Thu May 10 15:54:16 2012 +0100
> +++ b/xen/include/asm-arm/p2m.h Thu May 10 15:54:16 2012 +0100
> @@ -75,12 +75,6 @@ static inline struct page_info *get_page
> 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 -r 65768e16352c -r d95f0fb6c358 xen/include/asm-x86/p2m.h
> --- a/xen/include/asm-x86/p2m.h Thu May 10 15:54:16 2012 +0100
> +++ b/xen/include/asm-x86/p2m.h Thu May 10 15:54:16 2012 +0100
> @@ -339,17 +339,6 @@ static inline mfn_t get_gfn_type(struct
> #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);
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel [at] lists
> http://lists.xen.org/xen-devel



_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel

Xen devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.