diff options
Diffstat (limited to 'arch/i386/xen/enlighten.c')
-rw-r--r-- | arch/i386/xen/enlighten.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/i386/xen/enlighten.c b/arch/i386/xen/enlighten.c index 9a8c1181c001..f0c37511d8da 100644 --- a/arch/i386/xen/enlighten.c +++ b/arch/i386/xen/enlighten.c | |||
@@ -842,7 +842,8 @@ void __init xen_setup_vcpu_info_placement(void) | |||
842 | } | 842 | } |
843 | } | 843 | } |
844 | 844 | ||
845 | static unsigned xen_patch(u8 type, u16 clobbers, void *insns, unsigned len) | 845 | static unsigned xen_patch(u8 type, u16 clobbers, void *insnbuf, |
846 | unsigned long addr, unsigned len) | ||
846 | { | 847 | { |
847 | char *start, *end, *reloc; | 848 | char *start, *end, *reloc; |
848 | unsigned ret; | 849 | unsigned ret; |
@@ -869,7 +870,7 @@ static unsigned xen_patch(u8 type, u16 clobbers, void *insns, unsigned len) | |||
869 | if (start == NULL || (end-start) > len) | 870 | if (start == NULL || (end-start) > len) |
870 | goto default_patch; | 871 | goto default_patch; |
871 | 872 | ||
872 | ret = paravirt_patch_insns(insns, len, start, end); | 873 | ret = paravirt_patch_insns(insnbuf, len, start, end); |
873 | 874 | ||
874 | /* Note: because reloc is assigned from something that | 875 | /* Note: because reloc is assigned from something that |
875 | appears to be an array, gcc assumes it's non-null, | 876 | appears to be an array, gcc assumes it's non-null, |
@@ -877,8 +878,8 @@ static unsigned xen_patch(u8 type, u16 clobbers, void *insns, unsigned len) | |||
877 | end. */ | 878 | end. */ |
878 | if (reloc > start && reloc < end) { | 879 | if (reloc > start && reloc < end) { |
879 | int reloc_off = reloc - start; | 880 | int reloc_off = reloc - start; |
880 | long *relocp = (long *)(insns + reloc_off); | 881 | long *relocp = (long *)(insnbuf + reloc_off); |
881 | long delta = start - (char *)insns; | 882 | long delta = start - (char *)addr; |
882 | 883 | ||
883 | *relocp += delta; | 884 | *relocp += delta; |
884 | } | 885 | } |
@@ -886,7 +887,8 @@ static unsigned xen_patch(u8 type, u16 clobbers, void *insns, unsigned len) | |||
886 | 887 | ||
887 | default_patch: | 888 | default_patch: |
888 | default: | 889 | default: |
889 | ret = paravirt_patch_default(type, clobbers, insns, len); | 890 | ret = paravirt_patch_default(type, clobbers, insnbuf, |
891 | addr, len); | ||
890 | break; | 892 | break; |
891 | } | 893 | } |
892 | 894 | ||