mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86: Fix section mismatches in mpparse.
@ 2009-04-11  3:04 Rakib Mullick
  2009-04-12 10:33 ` [tip:x86/urgent] " Rakib Mullick
  0 siblings, 1 reply; 2+ messages in thread
From: Rakib Mullick @ 2009-04-11  3:04 UTC (permalink / raw)
  To: Ingo Molnar, Andrew Morton; +Cc: LKML

Impact: fix section mismatch

In arch/x86/kernel/mpparse.c, smp_reserve_bootmem() has been called
and also refers to a function which is in .init section. Thus causes
the first warning. And check_irq_src() also requires an __init,
because it refers to an .init section.

Thanks

  LD      arch/x86/kernel/built-in.o
WARNING: arch/x86/kernel/built-in.o(.text+0x10881): Section mismatch
in reference from the function smp_reserve_bootmem() to the function
.init.text:get_mpc_size()
The function smp_reserve_bootmem() references
the function __init get_mpc_size().
This is often because smp_reserve_bootmem lacks a __init
annotation or the annotation of get_mpc_size is wrong.

WARNING: arch/x86/kernel/built-in.o(.text+0x108d9): Section mismatch
in reference from the function check_irq_src() to the function
.init.text:get_MP_intsrc_index()
The function check_irq_src() references
the function __init get_MP_intsrc_index().
This is often because check_irq_src lacks a __init
annotation or the annotation of get_MP_intsrc_index is wrong.

WARNING: arch/x86/kernel/built-in.o(.text+0x108ed): Section mismatch
in reference from the function check_irq_src() to the function
.init.text:assign_to_mpc_intsrc()
The function check_irq_src() references
the function __init assign_to_mpc_intsrc().
This is often because check_irq_src lacks a __init
annotation or the annotation of assign_to_mpc_intsrc is wrong.

WARNING: arch/x86/kernel/built-in.o(.text+0x10908): Section mismatch
in reference from the function check_irq_src() to the function
.init.text:print_mp_irq_info()
The function check_irq_src() references
the function __init print_mp_irq_info().
This is often because check_irq_src lacks a __init
annotation or the annotation of print_mp_irq_info is wrong.

WARNING: arch/x86/kernel/built-in.o(.text+0x1091a): Section mismatch
in reference from the function check_irq_src() to the variable
.init.data:m_spare
The function check_irq_src() references
the variable __initdata m_spare.
This is often because check_irq_src lacks a __initdata
annotation or the annotation of m_spare is wrong.

Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>

--- linus/arch/x86/kernel/mpparse.c	2009-04-10 22:28:49.000000000 +0600
+++ rakib/arch/x86/kernel/mpparse.c	2009-04-10 23:15:36.975376512 +0600
@@ -679,7 +679,7 @@ void __init get_smp_config(void)
 	__get_smp_config(0);
 }

-static void smp_reserve_bootmem(struct mpf_intel *mpf)
+static void __init smp_reserve_bootmem(struct mpf_intel *mpf)
 {
 	unsigned long size = get_mpc_size(mpf->physptr);
 #ifdef CONFIG_X86_32
@@ -838,7 +838,7 @@ static int  __init get_MP_intsrc_index(s

 static struct mpc_intsrc __initdata *m_spare[SPARE_SLOT_NUM];

-static void check_irq_src(struct mpc_intsrc *m, int *nr_m_spare)
+static void __init check_irq_src(struct mpc_intsrc *m, int *nr_m_spare)
 {
 	int i;

@@ -866,7 +866,8 @@ static void check_irq_src(struct mpc_int
 	}
 }
 #else /* CONFIG_X86_IO_APIC */
-static inline void check_irq_src(struct mpc_intsrc *m, int *nr_m_spare) {}
+static
+inline void __init check_irq_src(struct mpc_intsrc *m, int *nr_m_spare) {}
 #endif /* CONFIG_X86_IO_APIC */

 static int check_slot(unsigned long mpc_new_phys, unsigned long mpc_new_length,

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [tip:x86/urgent] x86: Fix section mismatches in mpparse
  2009-04-11  3:04 [PATCH] x86: Fix section mismatches in mpparse Rakib Mullick
@ 2009-04-12 10:33 ` Rakib Mullick
  0 siblings, 0 replies; 2+ messages in thread
From: Rakib Mullick @ 2009-04-12 10:33 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, rakib.mullick, akpm, tglx, mingo

Commit-ID:  575922248c0df490843ddfbcf3bc65b54c4adb08
Gitweb:     http://git.kernel.org/tip/575922248c0df490843ddfbcf3bc65b54c4adb08
Author:     Rakib Mullick <rakib.mullick@gmail.com>
AuthorDate: Sat, 11 Apr 2009 09:04:59 +0600
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Sun, 12 Apr 2009 12:32:18 +0200

x86: Fix section mismatches in mpparse

Impact: fix section mismatch

In arch/x86/kernel/mpparse.c, smp_reserve_bootmem() has been called
and also refers to a function which is in .init section. Thus causes
the first warning. And check_irq_src() also requires an __init,
because it refers to an .init section.

Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
LKML-Reference: <b9df5fa10904102004g51265d9axc8d07278bfdb6ba0@mail.gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>


---
 arch/x86/kernel/mpparse.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c
index dce99dc..70fd7e4 100644
--- a/arch/x86/kernel/mpparse.c
+++ b/arch/x86/kernel/mpparse.c
@@ -679,7 +679,7 @@ void __init get_smp_config(void)
 	__get_smp_config(0);
 }
 
-static void smp_reserve_bootmem(struct mpf_intel *mpf)
+static void __init smp_reserve_bootmem(struct mpf_intel *mpf)
 {
 	unsigned long size = get_mpc_size(mpf->physptr);
 #ifdef CONFIG_X86_32
@@ -838,7 +838,7 @@ static int  __init get_MP_intsrc_index(struct mpc_intsrc *m)
 
 static struct mpc_intsrc __initdata *m_spare[SPARE_SLOT_NUM];
 
-static void check_irq_src(struct mpc_intsrc *m, int *nr_m_spare)
+static void __init check_irq_src(struct mpc_intsrc *m, int *nr_m_spare)
 {
 	int i;
 
@@ -866,7 +866,8 @@ static void check_irq_src(struct mpc_intsrc *m, int *nr_m_spare)
 	}
 }
 #else /* CONFIG_X86_IO_APIC */
-static inline void check_irq_src(struct mpc_intsrc *m, int *nr_m_spare) {}
+static
+inline void __init check_irq_src(struct mpc_intsrc *m, int *nr_m_spare) {}
 #endif /* CONFIG_X86_IO_APIC */
 
 static int check_slot(unsigned long mpc_new_phys, unsigned long mpc_new_length,

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-04-12 10:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-11  3:04 [PATCH] x86: Fix section mismatches in mpparse Rakib Mullick
2009-04-12 10:33 ` [tip:x86/urgent] " Rakib Mullick

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome