lkml.org 
[lkml]   [2019]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 02/17] x86, lto: Mark all top level asm statements as .text

    * Thomas Gleixner <tglx@linutronix.de> 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 <mingo@kernel.org>

    Thanks,

    Ingo

    \
     
     \ /
      Last update: 2019-03-27 15:41    [W:2.277 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site