lkml.org 
[lkml]   [2015]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: [PATCHV2 1/3] x86, ras: Add new infrastructure for machine check fixup tables
    On Mon, Dec 14, 2015 at 05:00:59PM -0800, Luck, Tony wrote:
    > Not sure what the "whatnot" would be though. Making it depend on
    > X86_MCE should keep it out of the tiny configurations. By the time
    > you have MCE support, this seems like a pretty small incremental
    > change.

    Ok, so it is called CONFIG_LIBNVDIMM. Do you see a use case for this
    stuff except on machines with NVDIMM hw? CONFIG_LIBNVDIMM can select it
    but on !NVDIMM systems you don't really need it enabled.

    > Is there some cpp magic to use an #ifdef inside a multi-line macro like this?
    > Impact of not having the #ifdef is two extra symbols (the start/stop ones)
    > in the symbol table of the final binary. If that's unacceptable I can fall
    > back to an earlier unpublished version that had separate EXCEPTION_TABLE and
    > MCEXCEPTION_TABLE macros with both invoked in the x86 vmlinux.lds.S file.

    I think what is more important is that this should be in the
    x86-specific linker script, not in the generic one. And yes, we should
    strive to be clean and not pullute the kernel image with symbols which
    are unused, i.e. when CONFIG_MCE_KERNEL_RECOVERY is not enabled.

    This below seems to build ok here, ontop of yours. It could be a
    MCEXCEPTION_TABLE macro, as you say:

    Index: b/include/asm-generic/vmlinux.lds.h
    ===================================================================
    --- a/include/asm-generic/vmlinux.lds.h 2015-12-15 10:17:25.568046033 +0100
    +++ b/include/asm-generic/vmlinux.lds.h 2015-12-15 10:07:06.064034490 +0100
    @@ -484,12 +484,6 @@
    *(__ex_table) \
    VMLINUX_SYMBOL(__stop___ex_table) = .; \
    } \
    - . = ALIGN(align); \
    - __mcex_table : AT(ADDR(__mcex_table) - LOAD_OFFSET) { \
    - VMLINUX_SYMBOL(__start___mcex_table) = .; \
    - *(__mcex_table) \
    - VMLINUX_SYMBOL(__stop___mcex_table) = .; \
    - }

    /*
    * Init task
    Index: b/arch/x86/kernel/vmlinux.lds.S
    ===================================================================
    --- a/arch/x86/kernel/vmlinux.lds.S 2015-12-14 11:38:58.188150070 +0100
    +++ b/arch/x86/kernel/vmlinux.lds.S 2015-12-15 10:09:04.624036699 +0100
    @@ -110,7 +110,17 @@ SECTIONS

    NOTES :text :note

    - EXCEPTION_TABLE(16) :text = 0x9090
    + EXCEPTION_TABLE(16)
    +
    +#ifdef CONFIG_MCE_KERNEL_RECOVERY
    + . = ALIGN(16);
    + __mcex_table : AT(ADDR(__mcex_table) - LOAD_OFFSET) {
    + VMLINUX_SYMBOL(__start___mcex_table) = .;
    + *(__mcex_table)
    + VMLINUX_SYMBOL(__stop___mcex_table) = .;
    + }
    +#endif
    + :text = 0x9090

    #if defined(CONFIG_DEBUG_RODATA)
    /* .text should occupy whole number of pages */
    --
    Regards/Gruss,
    Boris.

    ECO tip #101: Trim your mails when you reply.


    \
     
     \ /
      Last update: 2015-12-15 11:21    [W:5.615 / U:0.048 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site