Skip to content

Commit

Permalink
x86_64: Fix paravirt compilation
Browse files Browse the repository at this point in the history
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Andi Kleen authored and Linus Torvalds committed Jul 22, 2007
1 parent 4108964 commit 5f3f7cc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/i386/kernel/paravirt.c
Expand Up @@ -154,13 +154,14 @@ unsigned paravirt_patch_jmp(void *target, void *site, unsigned len)
{
unsigned char *jmp = site;
unsigned long delta = (unsigned long)target - (unsigned long)(jmp+5);
struct branch b;

if (len < 5)
return len; /* call too long for patch site */

b.opcode = 0xe9; /* jmp */
b.delta = delta;
text_poke(call, (unsigned char *)&b, 5);
text_poke(jmp, (unsigned char *)&b, 5);

return 5;
}
Expand Down

0 comments on commit 5f3f7cc

Please sign in to comment.