Skip to contentSkip to conversation

x86, tsc: fix section mismatch warning

PATCH In review Marcin Slusarz 3 participants 3 messages Aug 10, 2008 – Aug 17, 2008 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86, tsc: fix section mismatch warning

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

tsc_read_refs is called from native_calibrate_tsc which is not __init and native_calibrate_tsc cannot be marked __init

Cc Thomas Gleixner <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc H. Peter Anvin <[email protected]>
---
 arch/x86/kernel/tsc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kernel/tsc.c +1 -1
index 7603c05..46af716 100644
@@ -104,7 +104,7 @@ __setup("notsc", notsc_setup);
 /*
  * Read TSC and the reference counters. Take care of SMI disturbance
  */
-static u64 __init tsc_read_refs(u64 *pm, u64 *hpet)
+static u64 tsc_read_refs(u64 *pm, u64 *hpet)
 {
 	u64 t1, t2;
 	int i;
Signature · 1 line
1.5.4.5
#1 lore raw

Thanks!

I have pulled these four patches into tip:x86/cleanups.

-hpa

#2 lore raw
Quoted 3 lines · H. Peter Anvin

Thanks!

I have pulled these four patches into tip:x86/cleanups.

Section fixes are not cleanups but bugfixes.

E.g. this patch by Marcin fixes the following 2.6.27 regression (that was found 4 days after you applied his patch):
http://bugzilla.kernel.org/show_bug.cgi?id=11330

Can you make sure that Marcin's bugfixes makes it into 2.6.27?

Quoted 1 line

-hpa

TIA
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed