diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-02-28 13:35:09 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-02-28 13:35:09 -0500 |
commit | a7f16d10b510f9ee3500af7831f2e3094fab3dca (patch) | |
tree | bd2bff5e13083e1103205ff926342d6674f8e5c5 /arch/x86/kernel/alternative.c | |
parent | f66ffdedbf0fc059a92219bb08c1dbcac88f074b (diff) | |
parent | 17c0e7107bed3d578864e6519f7f4e4c324c8f58 (diff) |
Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86: Mark atomic irq ops raw for 32bit legacy
x86: Merge show_regs()
x86: Macroise x86 cache descriptors
x86-32: clean up rwsem inline asm statements
x86: Merge asm/atomic_{32,64}.h
x86: Sync asm/atomic_32.h and asm/atomic_64.h
x86: Split atomic64_t functions into seperate headers
x86-64: Modify memcpy()/memset() alternatives mechanism
x86-64: Modify copy_user_generic() alternatives mechanism
x86: Lift restriction on the location of FIX_BTMAP_*
x86, core: Optimize hweight32()
Diffstat (limited to 'arch/x86/kernel/alternative.c')
-rw-r--r-- | arch/x86/kernel/alternative.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c index e63b80e5861c..e6ea0342c8f8 100644 --- a/arch/x86/kernel/alternative.c +++ b/arch/x86/kernel/alternative.c | |||
@@ -205,7 +205,7 @@ void __init_or_module apply_alternatives(struct alt_instr *start, | |||
205 | struct alt_instr *end) | 205 | struct alt_instr *end) |
206 | { | 206 | { |
207 | struct alt_instr *a; | 207 | struct alt_instr *a; |
208 | char insnbuf[MAX_PATCH_LEN]; | 208 | u8 insnbuf[MAX_PATCH_LEN]; |
209 | 209 | ||
210 | DPRINTK("%s: alt table %p -> %p\n", __func__, start, end); | 210 | DPRINTK("%s: alt table %p -> %p\n", __func__, start, end); |
211 | for (a = start; a < end; a++) { | 211 | for (a = start; a < end; a++) { |
@@ -223,6 +223,8 @@ void __init_or_module apply_alternatives(struct alt_instr *start, | |||
223 | } | 223 | } |
224 | #endif | 224 | #endif |
225 | memcpy(insnbuf, a->replacement, a->replacementlen); | 225 | memcpy(insnbuf, a->replacement, a->replacementlen); |
226 | if (*insnbuf == 0xe8 && a->replacementlen == 5) | ||
227 | *(s32 *)(insnbuf + 1) += a->replacement - a->instr; | ||
226 | add_nops(insnbuf + a->replacementlen, | 228 | add_nops(insnbuf + a->replacementlen, |
227 | a->instrlen - a->replacementlen); | 229 | a->instrlen - a->replacementlen); |
228 | text_poke_early(instr, insnbuf, a->instrlen); | 230 | text_poke_early(instr, insnbuf, a->instrlen); |