Commit 5f3f7cc6 authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds

x86_64: Fix paravirt compilation

Signed-off-by: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 41089644
...@@ -154,13 +154,14 @@ unsigned paravirt_patch_jmp(void *target, void *site, unsigned len) ...@@ -154,13 +154,14 @@ unsigned paravirt_patch_jmp(void *target, void *site, unsigned len)
{ {
unsigned char *jmp = site; unsigned char *jmp = site;
unsigned long delta = (unsigned long)target - (unsigned long)(jmp+5); unsigned long delta = (unsigned long)target - (unsigned long)(jmp+5);
struct branch b;
if (len < 5) if (len < 5)
return len; /* call too long for patch site */ return len; /* call too long for patch site */
b.opcode = 0xe9; /* jmp */ b.opcode = 0xe9; /* jmp */
b.delta = delta; b.delta = delta;
text_poke(call, (unsigned char *)&b, 5); text_poke(jmp, (unsigned char *)&b, 5);
return 5; return 5;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment