post x86 merge section mismatch fixes
cover 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
PATCH 1/7 x86, xsave: fix section mismatch warning - setup_xstate_init
setup_xstate_init calls __init function (alloc_bootmem) and is called only from __init function (xsave_cntxt_init), so mark it static __init
WARNING: vmlinux.o(.text+0x8f7b): Section mismatch in reference from the function setup_xstate_init() to the function .init.text:__alloc_bootmem() The function setup_xstate_init() references
the function __init __alloc_bootmem().
This is often because setup_xstate_init lacks a __init
annotation or the annotation of __alloc_bootmem is wrong.
--- arch/x86/kernel/xsave.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kernel/xsave.c +1 -1
@@ -272,7 +272,7 @@ void __cpuinit xsave_init(void)/* * setup the xstate image representing the init state */ -void setup_xstate_init (void ) +static void __init setup_xstate_init (void ) { init_xstate_buf =alloc_bootmem (xstate_size); init_xstate_buf->i387.mxcsr =MXCSR_DEFAULT ;
Signature · 1 line
1.5.6.4
PATCH 2/7 x86: fix section mismatch warning - reserve_region_with_split
In reply to Marcin Slusarzreserve_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.
--- kernel/resource.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/resource.c +1 -1
@@ -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) {
Signature · 1 line
1.5.6.4
PATCH 3/7 x86: fix section mismatch warning - apic_flat
In reply to Marcin SlusarzWARNING: 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,
--- arch/x86/kernel/genapic_flat_64.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kernel/genapic_flat_64.c +1 -1
@@ -25,7 +25,7 @@#include <acpi/acpi_bus.h> #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 ; }
Signature · 1 line
1.5.6.4
PATCH 4/7 x86: fix section mismatch warning - apic_physflat
In reply to Marcin SlusarzWARNING: vmlinux.o(.data+0xbe88): Section mismatch in reference from the variable apic_physflat to the function .init.text:physflat_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,
--- arch/x86/kernel/genapic_flat_64.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kernel/genapic_flat_64.c +1 -1
@@ -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 /*
Signature · 1 line
1.5.6.4
PATCH 5/7 x86: fix section mismatch warning - apic_x2apic_uv_x
In reply to Marcin SlusarzWARNING: 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,
--- arch/x86/kernel/genx2apic_uv_x.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kernel/genx2apic_uv_x.c +1 -1
@@ -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" ))
Signature · 1 line
1.5.6.4
PATCH 6/7 x86: fix section mismatch warning - apic_x2apic_cluster
In reply to Marcin SlusarzWARNING: 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,
--- arch/x86/kernel/genx2apic_cluster.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kernel/genx2apic_cluster.c +1 -1
@@ -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 ;
Signature · 1 line
1.5.6.4
PATCH 7/7 x86: fix section mismatch warning - apic_x2apic_phys
In reply to Marcin SlusarzWARNING: 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,
--- arch/x86/kernel/genx2apic_phys.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kernel/genx2apic_phys.c +1 -1
@@ -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 ;
Signature · 1 line
1.5.6.4
Ingo Molnar
AppliedQuoted 7 lines · Marcin Slusarz
[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