Skip to contentSkip to conversation

2.6.17-rt1 unknown symbol monotonic_clock

DISCUSSION John Rigg 3 participants 4 messages Jun 21, 2006 Char and misc drivers

lore
Share & tools
lore

John Rigg

author
#0 lore raw

Just compiled 2.6.17-rt1 on x86_64 UP system and got the following message when doing `make modules_install':
WARNING: /lib/modules/2.6.17-rt1/kernel/drivers/char/hangcheck-timer.ko \
needs unknown symbol monotonic_clock

John

#1 lore raw

Hi John,

John Rigg napisał(a):

Quoted 4 lines

Just compiled 2.6.17-rt1 on x86_64 UP system and got the following message when doing `make modules_install':
WARNING: /lib/modules/2.6.17-rt1/kernel/drivers/char/hangcheck-timer.ko \
needs unknown symbol monotonic_clock

Please try this patch

drivers/char/hangcheck-timer.c +2 -0
diff -uprN -X linux-work/Documentation/dontdiff linux-work-clean/drivers/char/hangcheck-timer.c linux-work/drivers/char/hangcheck-timer.c
@@ -133,6 +133,8 @@ static inline unsigned long long monoton
 {
 	return get_cycles();
 }
+
+EXPORT_SYMBOL(monotonic_clock);
 #endif  /* HAVE_MONOTONIC */
 
Quoted 2 lines

John

Regards,
Michal

Signature · 3 lines
Michal K. K. Piotrowski
LTG - Linux Testers Group
(http://www.stardust.webpages.pl/ltg/wiki/)
#2 lore raw
In reply to John Rigg
Quoted 4 lines · John Rigg

Just compiled 2.6.17-rt1 on x86_64 UP system and got the following message when doing `make modules_install':
WARNING: /lib/modules/2.6.17-rt1/kernel/drivers/char/hangcheck-timer.ko \
needs unknown symbol monotonic_clock

please try -rt2 - does it work any better?

Ingo

author
#3 lore raw
Quoted 9 lines · Ingo Molnar
Quoted 4 lines · John Rigg

Just compiled 2.6.17-rt1 on x86_64 UP system and got the following message when doing `make modules_install':
WARNING: /lib/modules/2.6.17-rt1/kernel/drivers/char/hangcheck-timer.ko \
needs unknown symbol monotonic_clock

please try -rt2 - does it work any better?

I'd try it if I could find it :)

In the meantime I tried the patch below (don't know if it's correct but it works so far).

John

____________________________________________________________________

arch/x86_64/kernel/time.c +9 -0
diff -uprN linux-2.6.17.orig/arch/x86_64/kernel/time.c linux-2.6.17/arch/x86_64/kernel/time.c
@@ -247,6 +247,15 @@ unsigned long long sched_clock(void)
 	return cycles_2_ns(a);
 }
 
+/*
+ * Monotonic_clock - returns # of nanoseconds passed since time_init()
+ */
+unsigned long long monotonic_clock(void)
+{
+	return sched_clock();
+}
+EXPORT_SYMBOL(monotonic_clock);
+
 static int tsc_unstable;
 
 static inline int check_tsc_unstable(void)