]> git.hungrycats.org Git - linux/commitdiff
[PATCH] sparc32: early tick_ops
authorWilliam Lee Irwin III <wli@holomorphy.com>
Tue, 19 Oct 2004 01:17:43 +0000 (18:17 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 19 Oct 2004 01:17:43 +0000 (18:17 -0700)
The zaphod scheduler likes to call scheduler_tick() before time_init().
sparc32 oopses.

Perhaps a scheduler bug, but this robustifies things.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/sparc64/kernel/time.c

index 53bde9804ce755bb73d1e99a54d7d6d60b8b986a..96d7cba29679821b06c6bbc33dbc81fb2537da9d 100644 (file)
@@ -64,7 +64,16 @@ static unsigned long mstk48t59_regs = 0UL;
 
 static int set_rtc_mmss(unsigned long);
 
-struct sparc64_tick_ops *tick_ops;
+static __init unsigned long dummy_get_tick(void)
+{
+       return 0;
+}
+
+static __initdata struct sparc64_tick_ops dummy_tick_ops = {
+       .get_tick       = dummy_get_tick,
+};
+
+struct sparc64_tick_ops *tick_ops = &dummy_tick_ops;
 
 #define TICK_PRIV_BIT  (1UL << 63)