diff mbox

[v5,19/23] x86/mm: export get_page_light via asm-x86/mm.h

Message ID 20170914125852.22129-20-wei.liu2@citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Wei Liu Sept. 14, 2017, 12:58 p.m. UTC
It is going to be needed by common x86 mm code and pv mm code.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
 xen/arch/x86/mm.c        | 2 +-
 xen/include/asm-x86/mm.h | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

Comments

Jan Beulich Sept. 22, 2017, 3:49 p.m. UTC | #1
>>> On 14.09.17 at 14:58, <wei.liu2@citrix.com> wrote:
> It is going to be needed by common x86 mm code and pv mm code.

The sole callers are alloc_page_type() and __put_final_page_type(),
and their respective code paths should be PV only. I'd also prefer if
the compiler remained to be able to decide whether it wants to inline
the function.

Jan
diff mbox

Patch

diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
index f9cc5a0f6f..c3a26fe03d 100644
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -1955,7 +1955,7 @@  int get_page(struct page_info *page, struct domain *domain)
  *   acquired reference again.
  * Due to get_page() reserving one reference, this call cannot fail.
  */
-static void get_page_light(struct page_info *page)
+void get_page_light(struct page_info *page)
 {
     unsigned long x, nx, y = page->count_info;
 
diff --git a/xen/include/asm-x86/mm.h b/xen/include/asm-x86/mm.h
index fbb98e80c6..1f62155d56 100644
--- a/xen/include/asm-x86/mm.h
+++ b/xen/include/asm-x86/mm.h
@@ -363,6 +363,7 @@  int  put_old_guest_table(struct vcpu *);
 int  get_page_from_l1e(
     l1_pgentry_t l1e, struct domain *l1e_owner, struct domain *pg_owner);
 void put_page_from_l1e(l1_pgentry_t l1e, struct domain *l1e_owner);
+void get_page_light(struct page_info *page);
 
 static inline bool get_page_from_mfn(mfn_t mfn, struct domain *d)
 {