Skip to contentSkip to conversation

Fix CONFIG_CLOCKSOURCE_WATCHDOG=n compile

PATCH In review Prarit Bhargava 2 participants 3 messages Apr 11, 2012 – Apr 18, 2012 Timekeeping, clocksource core, NTP, alarmtimer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix CONFIG_CLOCKSOURCE_WATCHDOG=n compile

Noticed this while debugging -- compile fails with

arch/x86/built-in.o: In function `mark_tsc_unstable':
/home/linux-2.6/arch/x86/kernel/tsc.c:791: undefined reference to `clocksource_mark_unstable'
make: *** [.tmp_vmlinux1] Error 1

Add in an empty function for the !CONFIG_CLOCKSOURCE_WATCHDOG case.

Cc John Stultz <[email protected]>
Cc Thomas Gleixner <[email protected]>
---
 include/linux/clocksource.h |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
include/linux/clocksource.h +6 -0
index fbe89e1..dac8f91 100644
@@ -285,7 +285,13 @@ extern void clocksource_change_rating(struct clocksource *cs, int rating);
 extern void clocksource_suspend(void);
 extern void clocksource_resume(void);
 extern struct clocksource * __init __weak clocksource_default_clock(void);
+#ifdef CONFIG_CLOCKSOURCE_WATCHDOG
 extern void clocksource_mark_unstable(struct clocksource *cs);
+#else
+static inline void clocksource_mark_unstable(struct clocksource *cs)
+{
+}
+#endif
 
 extern void
 clocks_calc_mult_shift(u32 *mult, u32 *shift, u32 from, u32 to, u32 minsec);
Signature · 1 line
1.7.1
#1 lore raw
Quoted 8 lines · Prarit Bhargava

Noticed this while debugging -- compile fails with

arch/x86/built-in.o: In function `mark_tsc_unstable':
/home/linux-2.6/arch/x86/kernel/tsc.c:791: undefined reference to `clocksource_mark_unstable'
make: *** [.tmp_vmlinux1] Error 1

Add in an empty function for the !CONFIG_CLOCKSOURCE_WATCHDOG case.

CONFIG_CLOCKSOURCE_WATCHDOG for x86 is always 'y', so what's the point?

Thanks,

tglx

#2 lore raw
Quoted 4 lines · Thomas Gleixner
Quoted 2 lines · Prarit Bhargava

Noticed this while debugging -- compile fails with

Quoted 8 lines
Quoted 6 lines

arch/x86/built-in.o: In function `mark_tsc_unstable':
/home/linux-2.6/arch/x86/kernel/tsc.c:791: undefined reference to `clocksource_mark_unstable'
make: *** [.tmp_vmlinux1] Error 1

Add in an empty function for the !CONFIG_CLOCKSOURCE_WATCHDOG case.

CONFIG_CLOCKSOURCE_WATCHDOG for x86 is always 'y', so what's the point?

Ah, I was playing around with the .config directly while debugging and I didn't notice that. Sorry for the noise ...

P.