From ba1cbc97c89ab3f66226b6125a7e7af092dbb0a0 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Mon, 18 Jul 2011 09:10:23 +0200 Subject: [PATCH] on a SMP system, only the boot processor increases the timer value --- arch/x86/kernel/timer.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/x86/kernel/timer.c b/arch/x86/kernel/timer.c index 73c83a51..3df35d03 100644 --- a/arch/x86/kernel/timer.c +++ b/arch/x86/kernel/timer.c @@ -61,7 +61,12 @@ int sys_times(struct tms* buffer, clock_t* clock) static void timer_handler(struct state *s) { /* Increment our 'tick counter' */ +#if MAX_CORES > 1 + if (smp_id() == 0) + timer_ticks++; +#else timer_ticks++; +#endif /* * Every TIMER_FREQ clocks (approximately 1 second), we will