[PATCH 0/7] post x86 merge section mismatch fixes - Kernel

This is a discussion on [PATCH 0/7] post x86 merge section mismatch fixes - Kernel ; [PATCH 1/7] x86, xsave: fix section mismatch warning - setup_xstate_init [PATCH 2/7] x86: fix section mismatch warning - reserve_region_with_split [PATCH 3/7] x86: fix section mismatch warning - apic_flat [PATCH 4/7] x86: fix section mismatch warning - apic_physflat [PATCH 5/7] x86: ...

+ Reply to Thread
Results 1 to 8 of 8

Thread: [PATCH 0/7] post x86 merge section mismatch fixes

  1. [PATCH 0/7] post x86 merge section mismatch fixes

    [PATCH 1/7] x86, xsave: fix section mismatch warning - setup_xstate_init
    [PATCH 2/7] x86: fix section mismatch warning - reserve_region_with_split
    [PATCH 3/7] x86: fix section mismatch warning - apic_flat
    [PATCH 4/7] x86: fix section mismatch warning - apic_physflat
    [PATCH 5/7] x86: fix section mismatch warning - apic_x2apic_uv_x
    [PATCH 6/7] x86: fix section mismatch warning - apic_x2apic_cluster
    [PATCH 7/7] x86: fix section mismatch warning - apic_x2apic_phys

    arch/x86/kernel/genapic_flat_64.c | 4 ++--
    arch/x86/kernel/genx2apic_cluster.c | 2 +-
    arch/x86/kernel/genx2apic_phys.c | 2 +-
    arch/x86/kernel/genx2apic_uv_x.c | 2 +-
    arch/x86/kernel/xsave.c | 2 +-
    kernel/resource.c | 2 +-
    6 files changed, 7 insertions(+), 7 deletions(-)

    One warning left:

    WARNING: vmlinux.o(.cpuinit.text+0x4ad): Section mismatch in reference from the function fpu_init() to the function .init.text:init_thread_xstate()
    The function __cpuinit fpu_init() references
    a function __init init_thread_xstate().
    If init_thread_xstate is only used by fpu_init then
    annotate init_thread_xstate with a matching annotation.

    x86_64 cpu_init() (marked __cpu_init) calls fpu_init() (marked __cpu_init)
    and fpu_init calls init_thread_xstate (which is __init) if smp_processor_id() == 0.
    So it's probably OK, but it should be fixed properly (without ugly __ref)


    Marcin
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  2. [PATCH 4/7] x86: fix section mismatch warning - apic_physflat

    WARNING: vmlinux.o(.data+0xbe88): Section mismatch in reference from the variable apic_physflat to the function .init.texthysflat_acpi_madt_oem_check()
    The variable apic_physflat references
    the function __init physflat_acpi_madt_oem_check()
    If the reference is valid then annotate the
    variable with __init* (see linux/init.h) or name the variable:
    *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

    Signed-off-by: Marcin Slusarz
    Cc: Yinghai Lu
    Cc: Ingo Molnar
    ---
    arch/x86/kernel/genapic_flat_64.c | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)

    diff --git a/arch/x86/kernel/genapic_flat_64.c b/arch/x86/kernel/genapic_flat_64.c
    index 56d552c..59a732f 100644
    --- a/arch/x86/kernel/genapic_flat_64.c
    +++ b/arch/x86/kernel/genapic_flat_64.c
    @@ -170,7 +170,7 @@ struct genapic apic_flat = {
    * We cannot use logical delivery in this case because the mask
    * overflows, so use physical mode.
    */
    -static int __init physflat_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
    +static int physflat_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
    {
    #ifdef CONFIG_ACPI
    /*
    --
    1.5.6.4

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  3. [PATCH 5/7] x86: fix section mismatch warning - apic_x2apic_uv_x

    WARNING: vmlinux.o(.data+0xbf08): Section mismatch in reference from the variable apic_x2apic_uv_x to the function .init.text:uv_acpi_madt_oem_check()
    The variable apic_x2apic_uv_x references
    the function __init uv_acpi_madt_oem_check()
    If the reference is valid then annotate the
    variable with __init* (see linux/init.h) or name the variable:
    *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

    Signed-off-by: Marcin Slusarz
    Cc: Yinghai Lu
    Cc: Ingo Molnar
    ---
    arch/x86/kernel/genx2apic_uv_x.c | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)

    diff --git a/arch/x86/kernel/genx2apic_uv_x.c b/arch/x86/kernel/genx2apic_uv_x.c
    index ae2ffc8..b1369f4 100644
    --- a/arch/x86/kernel/genx2apic_uv_x.c
    +++ b/arch/x86/kernel/genx2apic_uv_x.c
    @@ -30,7 +30,7 @@ DEFINE_PER_CPU(int, x2apic_extra_bits);

    static enum uv_system_type uv_system_type;

    -static int __init uv_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
    +static int uv_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
    {
    if (!strcmp(oem_id, "SGI")) {
    if (!strcmp(oem_table_id, "UVL"))
    --
    1.5.6.4

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  4. [PATCH 3/7] x86: fix section mismatch warning - apic_flat

    WARNING: vmlinux.o(.data+0xbe08): Section mismatch in reference from the variable apic_flat to the function .init.text:flat_acpi_madt_oem_check()
    The variable apic_flat references
    the function __init flat_acpi_madt_oem_check()
    If the reference is valid then annotate the
    variable with __init* (see linux/init.h) or name the variable:
    *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

    Signed-off-by: Marcin Slusarz
    Cc: Yinghai Lu
    Cc: Ingo Molnar
    ---
    arch/x86/kernel/genapic_flat_64.c | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)

    diff --git a/arch/x86/kernel/genapic_flat_64.c b/arch/x86/kernel/genapic_flat_64.c
    index 9eca5ba..56d552c 100644
    --- a/arch/x86/kernel/genapic_flat_64.c
    +++ b/arch/x86/kernel/genapic_flat_64.c
    @@ -25,7 +25,7 @@
    #include
    #endif

    -static int __init flat_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
    +static int flat_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
    {
    return 1;
    }
    --
    1.5.6.4

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  5. [PATCH 7/7] x86: fix section mismatch warning - apic_x2apic_phys

    WARNING: vmlinux.o(.data+0xc008): Section mismatch in reference from the variable apic_x2apic_phys to the function .init.text:x2apic_acpi_madt_oem_check()
    The variable apic_x2apic_phys references
    the function __init x2apic_acpi_madt_oem_check()
    If the reference is valid then annotate the
    variable with __init* (see linux/init.h) or name the variable:
    *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

    Signed-off-by: Marcin Slusarz
    Cc: Yinghai Lu
    Cc: Ingo Molnar
    ---
    arch/x86/kernel/genx2apic_phys.c | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)

    diff --git a/arch/x86/kernel/genx2apic_phys.c b/arch/x86/kernel/genx2apic_phys.c
    index 8f1343d..d042211 100644
    --- a/arch/x86/kernel/genx2apic_phys.c
    +++ b/arch/x86/kernel/genx2apic_phys.c
    @@ -19,7 +19,7 @@ static int set_x2apic_phys_mode(char *arg)
    }
    early_param("x2apic_phys", set_x2apic_phys_mode);

    -static int __init x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
    +static int x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
    {
    if (cpu_has_x2apic && x2apic_phys)
    return 1;
    --
    1.5.6.4

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  6. [PATCH 2/7] x86: fix section mismatch warning - reserve_region_with_split

    reserve_region_with_split calls __init function (__reserve_region_with_split)
    and is called only from __init function (e820_reserve_resources_late),
    so mark it __init

    WARNING: vmlinux.o(.text+0x30299): Section mismatch in reference from the function reserve_region_with_split() to the function .init.text:__reserve_region_with_split()
    The function reserve_region_with_split() references
    the function __init __reserve_region_with_split().
    This is often because reserve_region_with_split lacks a __init
    annotation or the annotation of __reserve_region_with_split is wrong.

    Signed-off-by: Marcin Slusarz
    Cc: Yinghai Lu
    Cc: Ingo Molnar
    ---
    kernel/resource.c | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)

    diff --git a/kernel/resource.c b/kernel/resource.c
    index 414d6fc..914cea6 100644
    --- a/kernel/resource.c
    +++ b/kernel/resource.c
    @@ -575,7 +575,7 @@ static void __init __reserve_region_with_split(struct resource *root,

    }

    -void reserve_region_with_split(struct resource *root,
    +void __init reserve_region_with_split(struct resource *root,
    resource_size_t start, resource_size_t end,
    const char *name)
    {
    --
    1.5.6.4

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  7. [PATCH 6/7] x86: fix section mismatch warning - apic_x2apic_cluster

    WARNING: vmlinux.o(.data+0xbf88): Section mismatch in reference from the variable apic_x2apic_cluster to the function .init.text:x2apic_acpi_madt_oem_check()
    The variable apic_x2apic_cluster references
    the function __init x2apic_acpi_madt_oem_check()
    If the reference is valid then annotate the
    variable with __init* (see linux/init.h) or name the variable:
    *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

    Signed-off-by: Marcin Slusarz
    Cc: Yinghai Lu
    Cc: Ingo Molnar
    ---
    arch/x86/kernel/genx2apic_cluster.c | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)

    diff --git a/arch/x86/kernel/genx2apic_cluster.c b/arch/x86/kernel/genx2apic_cluster.c
    index e4bf2cc..f6a2c8e 100644
    --- a/arch/x86/kernel/genx2apic_cluster.c
    +++ b/arch/x86/kernel/genx2apic_cluster.c
    @@ -12,7 +12,7 @@

    DEFINE_PER_CPU(u32, x86_cpu_to_logical_apicid);

    -static int __init x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
    +static int x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
    {
    if (cpu_has_x2apic)
    return 1;
    --
    1.5.6.4

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  8. Re: [PATCH 0/7] post x86 merge section mismatch fixes


    * Marcin Slusarz wrote:

    > [PATCH 1/7] x86, xsave: fix section mismatch warning - setup_xstate_init
    > [PATCH 2/7] x86: fix section mismatch warning - reserve_region_with_split
    > [PATCH 3/7] x86: fix section mismatch warning - apic_flat
    > [PATCH 4/7] x86: fix section mismatch warning - apic_physflat
    > [PATCH 5/7] x86: fix section mismatch warning - apic_x2apic_uv_x
    > [PATCH 6/7] x86: fix section mismatch warning - apic_x2apic_cluster
    > [PATCH 7/7] x86: fix section mismatch warning - apic_x2apic_phys


    applied these to tip/x86/urgent:

    3cfba08: x86: fix section mismatch warning - apic_x2apic_phys
    2caa371: x86: fix section mismatch warning - apic_x2apic_cluster
    f8827c0: x86: fix section mismatch warning - apic_x2apic_uv_x
    fae1721: x86: fix section mismatch warning - apic_physflat
    983f91f: x86: fix section mismatch warning - apic_flat

    the warnings are harmless but worth fixing nevertheless.

    Thanks Marcin!

    Ingo
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

+ Reply to Thread