Re: Early hang with 2.6.21-rc4-rt1

Ingo Molnar
2007-03-25T08:07:11Z

* Ingo Molnar <mingo@elte.hu> wrote:

> hm - on 32-bit, CRITICAL_IRQSOFF_TIMING+FUNCTION_TRACING works fine
> for me. I'll try the 64-bit kernel too.

the 64-bit kernel indeed hangs. Does the patch below fix it for you?

Ingo

Index: linux/kernel/timer.c
===================================================================
--- linux.orig/kernel/timer.c
+++ linux/kernel/timer.c
@@ -822,8 +822,23 @@ EXPORT_SYMBOL(xtime);
/* XXX - all of this timekeeping code should be later moved to time.c */
#include <linux/clocksource.h>

+/*
+ * Dummy clocksource just in case someone tries to use the
+ * clocksource infrastructure before timekeeping_init() is
+ * called:
+ */
+static notrace cycle_t read_boot(void)
+{
+ return 0;
+}
+
+static __initdata struct clocksource clocksource_boot = {
+ .name = "boot",
+ .read = read_boot,
+};
+
/* pointer to current clocksource: */
-static __read_mostly struct clocksource *clock;
+static __read_mostly struct clocksource *clock = &clocksource_boot;

#ifdef CONFIG_GENERIC_TIME
/**