]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - arch/x86/include/asm/alternative.h
x86-64: Modify copy_user_generic() alternatives mechanism
[net-next-2.6.git] / arch / x86 / include / asm / alternative.h
index 69b74a7b877f917cd3f0bc9014045a1ea70d9412..3b5b828767b6233019d2ef755f06e22134885fcb 100644 (file)
@@ -125,11 +125,16 @@ static inline void alternatives_smp_switch(int smp) {}
        asm volatile (ALTERNATIVE(oldinstr, newinstr, feature)          \
                : output : "i" (0), ## input)
 
+/* Like alternative_io, but for replacing a direct call with another one. */
+#define alternative_call(oldfunc, newfunc, feature, output, input...)  \
+       asm volatile (ALTERNATIVE("call %P[old]", "call %P[new]", feature) \
+               : output : [old] "i" (oldfunc), [new] "i" (newfunc), ## input)
+
 /*
  * use this macro(s) if you need more than one output parameter
  * in alternative_io
  */
-#define ASM_OUTPUT2(a, b) a, b
+#define ASM_OUTPUT2(a...) a
 
 struct paravirt_patch_site;
 #ifdef CONFIG_PARAVIRT