2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-23 04:34:11 +08:00

x86_64: Fix paravirt compilation

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Andi Kleen 2007-07-22 13:21:41 +02:00 committed by Linus Torvalds
parent 41089644c1
commit 5f3f7cc6ad

View File

@ -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;
}