]> Git Repo - linux.git/commitdiff
x86/paravirt: Kill some unused patching functions
authorBorislav Petkov <[email protected]>
Tue, 3 Nov 2015 09:18:49 +0000 (10:18 +0100)
committerThomas Gleixner <[email protected]>
Sat, 7 Nov 2015 17:09:35 +0000 (18:09 +0100)
paravirt_patch_ignore() is completely unused and paravirt_patch_nop()
doesn't do a whole lot. Remove them both.

Signed-off-by: Borislav Petkov <[email protected]>
Reviewed-by: Juergen Gross <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Chris Wright <[email protected]>
Cc: Jeremy Fitzhardinge <[email protected]>
Cc: "Peter Zijlstra (Intel)" <[email protected]>
Cc: Rusty Russell <[email protected]>
Cc: [email protected]
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Thomas Gleixner <[email protected]>
arch/x86/include/asm/paravirt_types.h
arch/x86/kernel/paravirt.c

index 31247b5bff7c8ff86d893851dc9073b72a647cc2..e1f31dfc3b31c016bf962613be3b151033c7d1d6 100644 (file)
@@ -402,10 +402,8 @@ extern struct pv_lock_ops pv_lock_ops;
        __visible extern const char start_##ops##_##name[], end_##ops##_##name[];       \
        asm(NATIVE_LABEL("start_", ops, name) code NATIVE_LABEL("end_", ops, name))
 
-unsigned paravirt_patch_nop(void);
 unsigned paravirt_patch_ident_32(void *insnbuf, unsigned len);
 unsigned paravirt_patch_ident_64(void *insnbuf, unsigned len);
-unsigned paravirt_patch_ignore(unsigned len);
 unsigned paravirt_patch_call(void *insnbuf,
                             const void *target, u16 tgt_clobbers,
                             unsigned long addr, u16 site_clobbers,
index c2130aef3f9d25d6c6a47f3499b8096c5cfb8e80..4f32a10979dbb503dcb6145d215529232013b5f0 100644 (file)
@@ -74,16 +74,6 @@ void __init default_banner(void)
 /* Undefined instruction for dealing with missing ops pointers. */
 static const unsigned char ud2a[] = { 0x0f, 0x0b };
 
-unsigned paravirt_patch_nop(void)
-{
-       return 0;
-}
-
-unsigned paravirt_patch_ignore(unsigned len)
-{
-       return len;
-}
-
 struct branch {
        unsigned char opcode;
        u32 delta;
@@ -152,8 +142,7 @@ unsigned paravirt_patch_default(u8 type, u16 clobbers, void *insnbuf,
                /* If there's no function, patch it with a ud2a (BUG) */
                ret = paravirt_patch_insns(insnbuf, len, ud2a, ud2a+sizeof(ud2a));
        else if (opfunc == _paravirt_nop)
-               /* If the operation is a nop, then nop the callsite */
-               ret = paravirt_patch_nop();
+               ret = 0;
 
        /* identity functions just return their single argument */
        else if (opfunc == _paravirt_ident_32)
This page took 0.068494 seconds and 4 git commands to generate.