x86/paravirt: Have only one paravirt patch function
[sfrench/cifs-2.6.git] / arch / x86 / kernel / paravirt.c
index 855ae08a05a1fca938406dca9d0b6ddefaf8d494..d0730264786b2175e409cc1396edc8668afe8ecf 100644 (file)
@@ -99,8 +99,8 @@ void __init native_pv_lock_init(void)
                static_branch_disable(&virt_spin_lock_key);
 }
 
-unsigned paravirt_patch_default(u8 type, void *insn_buff,
-                               unsigned long addr, unsigned len)
+unsigned int paravirt_patch(u8 type, void *insn_buff, unsigned long addr,
+                           unsigned int len)
 {
        /*
         * Neat trick to map patch type back to the call within the
@@ -121,19 +121,6 @@ unsigned paravirt_patch_default(u8 type, void *insn_buff,
        return ret;
 }
 
-unsigned paravirt_patch_insns(void *insn_buff, unsigned len,
-                             const char *start, const char *end)
-{
-       unsigned insn_len = end - start;
-
-       /* Alternative instruction is too large for the patch site and we cannot continue: */
-       BUG_ON(insn_len > len || start == NULL);
-
-       memcpy(insn_buff, start, insn_len);
-
-       return insn_len;
-}
-
 struct static_key paravirt_steal_enabled;
 struct static_key paravirt_steal_rq_enabled;
 
@@ -252,9 +239,6 @@ struct pv_info pv_info = {
 #define PTE_IDENT      __PV_IS_CALLEE_SAVE(_paravirt_ident_64)
 
 struct paravirt_patch_template pv_ops = {
-       /* Init ops. */
-       .init.patch             = native_patch,
-
        /* Cpu ops. */
        .cpu.io_delay           = native_io_delay,