aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/paravirt.h
diff options
context:
space:
mode:
authorGlauber de Oliveira Costa <gcosta@redhat.com>2008-01-30 07:32:10 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:32:10 -0500
commit2f485ef568372af4680c4e2f8490efb9f2523b05 (patch)
treed1a244d31333524d2636affe4a862b8058ae4f92 /include/asm-x86/paravirt.h
parent21438f7c138f0b893a32df3cc77434e39a2145f8 (diff)
x86: move patching code to arch-specific file.
The core patching code for paravirt is sufficiently different among i386 and x86_64, and we move them to specific files. Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/asm-x86/paravirt.h')
-rw-r--r--include/asm-x86/paravirt.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/asm-x86/paravirt.h b/include/asm-x86/paravirt.h
index 5935c273af1f..b35ed95166e4 100644
--- a/include/asm-x86/paravirt.h
+++ b/include/asm-x86/paravirt.h
@@ -308,6 +308,11 @@ extern struct pv_mmu_ops pv_mmu_ops;
308#define paravirt_alt(insn_string) \ 308#define paravirt_alt(insn_string) \
309 _paravirt_alt(insn_string, "%c[paravirt_typenum]", "%c[paravirt_clobber]") 309 _paravirt_alt(insn_string, "%c[paravirt_typenum]", "%c[paravirt_clobber]")
310 310
311/* Simple instruction patching code. */
312#define DEF_NATIVE(ops, name, code) \
313 extern const char start_##ops##_##name[], end_##ops##_##name[]; \
314 asm("start_" #ops "_" #name ": " code "; end_" #ops "_" #name ":")
315
311unsigned paravirt_patch_nop(void); 316unsigned paravirt_patch_nop(void);
312unsigned paravirt_patch_ignore(unsigned len); 317unsigned paravirt_patch_ignore(unsigned len);
313unsigned paravirt_patch_call(void *insnbuf, 318unsigned paravirt_patch_call(void *insnbuf,
@@ -322,6 +327,9 @@ unsigned paravirt_patch_default(u8 type, u16 clobbers, void *insnbuf,
322unsigned paravirt_patch_insns(void *insnbuf, unsigned len, 327unsigned paravirt_patch_insns(void *insnbuf, unsigned len,
323 const char *start, const char *end); 328 const char *start, const char *end);
324 329
330unsigned native_patch(u8 type, u16 clobbers, void *ibuf,
331 unsigned long addr, unsigned len);
332
325int paravirt_disable_iospace(void); 333int paravirt_disable_iospace(void);
326 334
327/* 335/*