* Thomas Gleixner <[email protected]> wrote:

> Proper fix below.
> 
> Thanks,
> 
>       tglx
> 
> 8<-------------------
> 
> --- a/arch/x86/include/asm/paravirt_types.h
> +++ b/arch/x86/include/asm/paravirt_types.h
> @@ -367,11 +367,15 @@ extern struct paravirt_patch_template pv
>       _paravirt_alt(insn_string, "%c[paravirt_typenum]", 
> "%c[paravirt_clobber]")
>  
>  /* Simple instruction patching code. */
> -#define NATIVE_LABEL(a,x,b) "\n\t.globl " a #x "_" #b "\n" a #x "_" #b 
> ":\n\t"
> +#define NATIVE_LABEL(a,x,b) "\n" a #x "_" #b ":\n\t"
>  
>  #define DEF_NATIVE(ops, name, code)                                  \
> -     __visible extern const char start_##ops##_##name[], 
> end_##ops##_##name[];       \
> -     asm(NATIVE_LABEL("start_", ops, name) code NATIVE_LABEL("end_", ops, 
> name))
> +     static const char start_##ops##_##name[], end_##ops##_##name[]; \
> +     asm(".pushsection .rodata, \"a\"\n"                             \
> +         NATIVE_LABEL("start_", ops, name)                           \
> +         code                                                        \
> +         NATIVE_LABEL("end_", ops, name)                             \
> +         ".popsection\n")

Acked-by: Ingo Molnar <[email protected]>

Thanks,

        Ingo

Reply via email to