From: Jeremy Fitzhardinge Subject: [patch 12/34] Xen-pv_ops: rename struct paravirt_patch to paravirt_patch_site for clarity Date: Tue, 13 Mar 2007 16:30:29 -0700 Message-ID: <20070313233031.461026179@goop.org> References: <20070313233017.933601256@goop.org> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline; filename=paravirt-patch-rename-paravirt_patch.patch List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.osdl.org Errors-To: virtualization-bounces@lists.osdl.org To: Andi Kleen Cc: Chris Wright , virtualization@lists.osdl.org, xen-devel@lists.xensource.com, Andrew Morton , linux-kernel@vger.kernel.org List-Id: virtualization@lists.linuxfoundation.org Rename struct paravirt_patch to paravirt_patch_site, so that it clearly refers to a callsite, and not the patch which may be applied to that callsite. Signed-off-by: Jeremy Fitzhardinge Cc: Rusty Russell Cc: Zachary Amsden --- arch/i386/kernel/alternative.c | 8 +++----- arch/i386/kernel/vmi.c | 4 ---- include/asm-i386/alternative.h | 6 +++--- include/asm-i386/paravirt.h | 5 ++++- 4 files changed, 10 insertions(+), 13 deletions(-) =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 --- a/arch/i386/kernel/alternative.c +++ b/arch/i386/kernel/alternative.c @@ -350,9 +350,9 @@ void alternatives_smp_switch(int smp) #endif = #ifdef CONFIG_PARAVIRT -void apply_paravirt(struct paravirt_patch *start, struct paravirt_patch *e= nd) -{ - struct paravirt_patch *p; +void apply_paravirt(struct paravirt_patch_site *start, struct paravirt_pat= ch_site *end) +{ + struct paravirt_patch_site *p; = for (p =3D start; p < end; p++) { unsigned int used; @@ -379,8 +379,6 @@ void apply_paravirt(struct paravirt_patc /* Sync to be conservative, in case we patched following instructions */ sync_core(); } -extern struct paravirt_patch __start_parainstructions[], - __stop_parainstructions[]; #endif /* CONFIG_PARAVIRT */ = void __init alternative_instructions(void) =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 --- a/arch/i386/kernel/vmi.c +++ b/arch/i386/kernel/vmi.c @@ -70,10 +70,6 @@ struct { void (*set_initial_ap_state)(int, int); void (*halt)(void); } vmi_ops; - -/* XXX move this to alternative.h */ -extern struct paravirt_patch __start_parainstructions[], - __stop_parainstructions[]; = /* * VMI patching routines. =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 --- a/include/asm-i386/alternative.h +++ b/include/asm-i386/alternative.h @@ -118,12 +118,12 @@ static inline void alternatives_smp_swit #define LOCK_PREFIX "" #endif = -struct paravirt_patch; +struct paravirt_patch_site; #ifdef CONFIG_PARAVIRT -void apply_paravirt(struct paravirt_patch *start, struct paravirt_patch *e= nd); +void apply_paravirt(struct paravirt_patch_site *start, struct paravirt_pat= ch_site *end); #else static inline void -apply_paravirt(struct paravirt_patch *start, struct paravirt_patch *end) +apply_paravirt(struct paravirt_patch_site *start, struct paravirt_patch_si= te *end) {} #define __start_parainstructions NULL #define __stop_parainstructions NULL =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 --- a/include/asm-i386/paravirt.h +++ b/include/asm-i386/paravirt.h @@ -501,12 +501,15 @@ void _paravirt_nop(void); #define paravirt_nop ((void *)_paravirt_nop) = /* These all sit in the .parainstructions section to tell us what to patch= . */ -struct paravirt_patch { +struct paravirt_patch_site { u8 *instr; /* original instructions */ u8 instrtype; /* type of this instruction */ u8 len; /* length of original instruction */ u16 clobbers; /* what registers you may clobber */ }; + +extern struct paravirt_patch_site __start_parainstructions[], + __stop_parainstructions[]; = #define paravirt_alt(insn_string, typenum, clobber) \ "771:\n\t" insn_string "\n" "772:\n" \ -- =