diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2007-05-02 13:27:13 -0400 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2007-05-02 13:27:13 -0400 |
commit | 45876233605c268e929a7875081e129debe34bdc (patch) | |
tree | c16487f8e8428e86ecf9802c8ba0da82225622ee /include/asm-i386/paravirt.h | |
parent | 7f63c41c6c57371a0931da3940c6620c2301442c (diff) |
[PATCH] i386: PARAVIRT: use paravirt_nop to consistently mark no-op operations
Add a _paravirt_nop function for use as a stub for no-op operations,
and paravirt_nop #defined void * version to make using it easier
(since all its uses are as a void *).
This is useful to allow the patcher to automatically identify noop
operations so it can simply nop out the callsite.
Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
[mingo] but only as a cleanup of the current open-coded (void *) casts.
My problem with this is that it loses the types. Not that there is much
to check for, but still, this adds some assumptions about how function
calls look like
Diffstat (limited to 'include/asm-i386/paravirt.h')
-rw-r--r-- | include/asm-i386/paravirt.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/asm-i386/paravirt.h b/include/asm-i386/paravirt.h index 32acebce9ae2..f0bdaea6235d 100644 --- a/include/asm-i386/paravirt.h +++ b/include/asm-i386/paravirt.h | |||
@@ -434,6 +434,9 @@ static inline void pmd_clear(pmd_t *pmdp) | |||
434 | #define arch_leave_lazy_mmu_mode() paravirt_ops.set_lazy_mode(PARAVIRT_LAZY_NONE) | 434 | #define arch_leave_lazy_mmu_mode() paravirt_ops.set_lazy_mode(PARAVIRT_LAZY_NONE) |
435 | #define arch_flush_lazy_mmu_mode() paravirt_ops.set_lazy_mode(PARAVIRT_LAZY_FLUSH) | 435 | #define arch_flush_lazy_mmu_mode() paravirt_ops.set_lazy_mode(PARAVIRT_LAZY_FLUSH) |
436 | 436 | ||
437 | void _paravirt_nop(void); | ||
438 | #define paravirt_nop ((void *)_paravirt_nop) | ||
439 | |||
437 | /* These all sit in the .parainstructions section to tell us what to patch. */ | 440 | /* These all sit in the .parainstructions section to tell us what to patch. */ |
438 | struct paravirt_patch { | 441 | struct paravirt_patch { |
439 | u8 *instr; /* original instructions */ | 442 | u8 *instr; /* original instructions */ |