From dca3f4372e60e257d573b017e14e8f1fed2fe274 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Fri, 8 May 2009 16:44:00 +0900 Subject: [PATCH] --- yaml --- r: 146723 b: refs/heads/master c: 5ac5496411b30d41945a996fe7a7fb5abccf2aaa h: refs/heads/master i: 146721: 1dd9d9690c2142d425a77b3001d8189d237775a4 146719: 801d4791a3dd9099b833863d4622d82859717e0d v: v3 --- [refs] | 2 +- trunk/arch/sh/include/asm/timer.h | 5 --- trunk/arch/sh/kernel/time.c | 53 +++---------------------------- 3 files changed, 5 insertions(+), 55 deletions(-) diff --git a/[refs] b/[refs] index 9988255211e2..116d72b8a307 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6d134b9e8d3f32331ad2faca2db8186f54198931 +refs/heads/master: 5ac5496411b30d41945a996fe7a7fb5abccf2aaa diff --git a/trunk/arch/sh/include/asm/timer.h b/trunk/arch/sh/include/asm/timer.h index cb16645d8397..6c0851188c00 100644 --- a/trunk/arch/sh/include/asm/timer.h +++ b/trunk/arch/sh/include/asm/timer.h @@ -18,17 +18,12 @@ struct sys_timer { struct sys_timer_ops *ops; }; -#define TICK_SIZE (tick_nsec / 1000) - extern struct sys_timer tmu_timer; extern struct sys_timer *sys_timer; /* arch/sh/kernel/timers/timer.c */ struct sys_timer *get_sys_timer(void); -/* arch/sh/kernel/time.c */ -void handle_timer_tick(void); - extern struct clocksource clocksource_sh; #endif /* __ASM_SH_TIMER_H */ diff --git a/trunk/arch/sh/kernel/time.c b/trunk/arch/sh/kernel/time.c index 77b841a99c01..f4c304adec42 100644 --- a/trunk/arch/sh/kernel/time.c +++ b/trunk/arch/sh/kernel/time.c @@ -1,13 +1,14 @@ /* - * arch/sh/kernel/time_32.c + * arch/sh/kernel/time.c * * Copyright (C) 1999 Tetsuya Okada & Niibe Yutaka * Copyright (C) 2000 Philipp Rumpf * Copyright (C) 2002 - 2009 Paul Mundt * Copyright (C) 2002 M. R. Brown * - * Some code taken from i386 version. - * Copyright (C) 1991, 1992, 1995 Linus Torvalds + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. */ #include #include @@ -23,7 +24,6 @@ #include #include #include -#include struct sys_timer *sys_timer; @@ -97,50 +97,6 @@ static int __init rtc_generic_init(void) } module_init(rtc_generic_init); -/* last time the RTC clock got updated */ -static long last_rtc_update; - -/* - * handle_timer_tick() needs to keep up the real-time clock, - * as well as call the "do_timer()" routine every clocktick - */ -void handle_timer_tick(void) -{ - if (current->pid) - profile_tick(CPU_PROFILING); - - /* - * Here we are in the timer irq handler. We just have irqs locally - * disabled but we don't know if the timer_bh is running on the other - * CPU. We need to avoid to SMP race with it. NOTE: we don' t need - * the irq version of write_lock because as just said we have irq - * locally disabled. -arca - */ - write_seqlock(&xtime_lock); - do_timer(1); - - /* - * If we have an externally synchronized Linux clock, then update - * RTC clock accordingly every ~11 minutes. Set_rtc_mmss() has to be - * called as close as possible to 500 ms before the new second starts. - */ - if (ntp_synced() && - xtime.tv_sec > last_rtc_update + 660 && - (xtime.tv_nsec / 1000) >= 500000 - ((unsigned) TICK_SIZE) / 2 && - (xtime.tv_nsec / 1000) <= 500000 + ((unsigned) TICK_SIZE) / 2) { - if (rtc_sh_set_time(xtime.tv_sec) == 0) - last_rtc_update = xtime.tv_sec; - else - /* do it again in 60s */ - last_rtc_update = xtime.tv_sec - 600; - } - write_sequnlock(&xtime_lock); - -#ifndef CONFIG_SMP - update_process_times(user_mode(get_irq_regs())); -#endif -} - #ifdef CONFIG_PM int timer_suspend(struct sys_device *dev, pm_message_t state) { @@ -242,4 +198,3 @@ void __init time_init(void) late_time_init = sh_late_time_init; } -