From: "Jan Beulich" Subject: [PATCH] more static shadow functions Date: Thu, 11 Oct 2007 10:04:07 +0100 Message-ID: <470E0327.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org What can be static generally also should be. Signed-off-by: Jan Beulich Index: 2007-10-10/xen/arch/x86/mm/shadow/common.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 2007-10-10.orig/xen/arch/x86/mm/shadow/common.c 2007-10-11 = 10:53:12.000000000 +0200 +++ 2007-10-10/xen/arch/x86/mm/shadow/common.c 2007-10-11 10:53:37.0000000= 00 +0200 @@ -667,7 +667,7 @@ int shadow_cmpxchg_guest_entry(struct vc * at the same time, which means that to guarantee progress, we must * allow for more than ninety allocated pages per vcpu. We round that * up to 128 pages, or half a megabyte per vcpu. */ -unsigned int shadow_min_acceptable_pages(struct domain *d)=20 +static unsigned int shadow_min_acceptable_pages(struct domain *d)=20 { u32 vcpu_count =3D 0; struct vcpu *v; @@ -722,7 +722,7 @@ static inline int chunk_is_available(str =20 /* Dispatcher function: call the per-mode function that will unhook the * non-Xen mappings in this top-level shadow mfn */ -void shadow_unhook_mappings(struct vcpu *v, mfn_t smfn) +static void shadow_unhook_mappings(struct vcpu *v, mfn_t smfn) { struct shadow_page_info *sp =3D mfn_to_shadow_page(smfn); switch ( sp->type ) @@ -1062,7 +1062,7 @@ sh_alloc_p2m_pages(struct domain *d) } =20 // Returns 0 if no memory is available... -struct page_info *=20 +static struct page_info * shadow_alloc_p2m_page(struct domain *d) { struct list_head *entry; @@ -1092,7 +1092,7 @@ shadow_alloc_p2m_page(struct domain *d) return pg; } =20 -void +static void shadow_free_p2m_page(struct domain *d, struct page_info *pg) { ASSERT(page_get_owner(pg) =3D=3D d); Index: 2007-10-10/xen/arch/x86/mm/shadow/private.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 2007-10-10.orig/xen/arch/x86/mm/shadow/private.h 2007-10-11 = 10:53:12.000000000 +0200 +++ 2007-10-10/xen/arch/x86/mm/shadow/private.h 2007-10-10 16:57:56.0000000= 00 +0200 @@ -360,10 +360,6 @@ mfn_t shadow_alloc(struct domain *d,=20 unsigned long backpointer); void shadow_free(struct domain *d, mfn_t smfn); =20 -/* Dispatcher function: call the per-mode function that will unhook the - * non-Xen mappings in this top-level shadow mfn */ -void shadow_unhook_mappings(struct vcpu *v, mfn_t smfn); - /* Install the xen mappings in various flavours of shadow */ void sh_install_xen_entries_in_l4(struct vcpu *v, mfn_t gl4mfn, mfn_t = sl4mfn); void sh_install_xen_entries_in_l2(struct vcpu *v, mfn_t gl2mfn, mfn_t = sl2mfn); @@ -383,10 +379,6 @@ extern int sh_remove_write_access(struct unsigned int level, unsigned long fault_addr); =20 -/* Allocate/free functions for passing to the P2M code. */ -struct page_info *shadow_alloc_p2m_page(struct domain *d); -void shadow_free_p2m_page(struct domain *d, struct page_info *pg); - /* Functions that atomically write PT/P2M entries and update state */ void shadow_write_p2m_entry(struct vcpu *v, unsigned long gfn,=20 l1_pgentry_t *p, mfn_t table_mfn,