Commit 98de032b authored by Jeremy Fitzhardinge's avatar Jeremy Fitzhardinge Committed by Andi Kleen

[PATCH] i386: PARAVIRT: rename struct paravirt_patch to paravirt_patch_site for clarity

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: default avatarJeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Zachary Amsden <zach@vmware.com>
parent d6dd61c8
...@@ -325,9 +325,10 @@ void alternatives_smp_switch(int smp) ...@@ -325,9 +325,10 @@ void alternatives_smp_switch(int smp)
#endif #endif
#ifdef CONFIG_PARAVIRT #ifdef CONFIG_PARAVIRT
void apply_paravirt(struct paravirt_patch *start, struct paravirt_patch *end) void apply_paravirt(struct paravirt_patch_site *start,
struct paravirt_patch_site *end)
{ {
struct paravirt_patch *p; struct paravirt_patch_site *p;
for (p = start; p < end; p++) { for (p = start; p < end; p++) {
unsigned int used; unsigned int used;
...@@ -342,7 +343,7 @@ void apply_paravirt(struct paravirt_patch *start, struct paravirt_patch *end) ...@@ -342,7 +343,7 @@ void apply_paravirt(struct paravirt_patch *start, struct paravirt_patch *end)
/* Sync to be conservative, in case we patched following instructions */ /* Sync to be conservative, in case we patched following instructions */
sync_core(); sync_core();
} }
extern struct paravirt_patch __start_parainstructions[], extern struct paravirt_patch_site __start_parainstructions[],
__stop_parainstructions[]; __stop_parainstructions[];
#endif /* CONFIG_PARAVIRT */ #endif /* CONFIG_PARAVIRT */
......
...@@ -115,12 +115,14 @@ static inline void alternatives_smp_switch(int smp) {} ...@@ -115,12 +115,14 @@ static inline void alternatives_smp_switch(int smp) {}
#define LOCK_PREFIX "" #define LOCK_PREFIX ""
#endif #endif
struct paravirt_patch; struct paravirt_patch_site;
#ifdef CONFIG_PARAVIRT #ifdef CONFIG_PARAVIRT
void apply_paravirt(struct paravirt_patch *start, struct paravirt_patch *end); void apply_paravirt(struct paravirt_patch_site *start,
struct paravirt_patch_site *end);
#else #else
static inline void static inline void
apply_paravirt(struct paravirt_patch *start, struct paravirt_patch *end) apply_paravirt(struct paravirt_patch_site *start,
struct paravirt_patch_site *end)
{} {}
#define __start_parainstructions NULL #define __start_parainstructions NULL
#define __stop_parainstructions NULL #define __stop_parainstructions NULL
......
...@@ -505,13 +505,16 @@ void _paravirt_nop(void); ...@@ -505,13 +505,16 @@ void _paravirt_nop(void);
#define paravirt_nop ((void *)_paravirt_nop) #define paravirt_nop ((void *)_paravirt_nop)
/* These all sit in the .parainstructions section to tell us what to patch. */ /* 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 *instr; /* original instructions */
u8 instrtype; /* type of this instruction */ u8 instrtype; /* type of this instruction */
u8 len; /* length of original instruction */ u8 len; /* length of original instruction */
u16 clobbers; /* what registers you may clobber */ u16 clobbers; /* what registers you may clobber */
}; };
extern struct paravirt_patch_site __parainstructions[],
__parainstructions_end[];
#define paravirt_alt(insn_string, typenum, clobber) \ #define paravirt_alt(insn_string, typenum, clobber) \
"771:\n\t" insn_string "\n" "772:\n" \ "771:\n\t" insn_string "\n" "772:\n" \
".pushsection .parainstructions,\"a\"\n" \ ".pushsection .parainstructions,\"a\"\n" \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment