aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/time.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-05-08 03:44:00 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-05-08 03:44:00 -0400
commit5ac5496411b30d41945a996fe7a7fb5abccf2aaa (patch)
treef79d9cb0933186628e2fff82bfaa43676a5d83f9 /arch/sh/kernel/time.c
parent6d134b9e8d3f32331ad2faca2db8186f54198931 (diff)
sh: Kill off dead handle_timer_tick() code.
Nothing is using this anymore now that we have fully converted to generic time, so kill it off completely. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/time.c')
-rw-r--r--arch/sh/kernel/time.c53
1 files changed, 4 insertions, 49 deletions
diff --git a/arch/sh/kernel/time.c b/arch/sh/kernel/time.c
index 77b841a99c01..f4c304adec42 100644
--- a/arch/sh/kernel/time.c
+++ b/arch/sh/kernel/time.c
@@ -1,13 +1,14 @@
1/* 1/*
2 * arch/sh/kernel/time_32.c 2 * arch/sh/kernel/time.c
3 * 3 *
4 * Copyright (C) 1999 Tetsuya Okada & Niibe Yutaka 4 * Copyright (C) 1999 Tetsuya Okada & Niibe Yutaka
5 * Copyright (C) 2000 Philipp Rumpf <prumpf@tux.org> 5 * Copyright (C) 2000 Philipp Rumpf <prumpf@tux.org>
6 * Copyright (C) 2002 - 2009 Paul Mundt 6 * Copyright (C) 2002 - 2009 Paul Mundt
7 * Copyright (C) 2002 M. R. Brown <mrbrown@linux-sh.org> 7 * Copyright (C) 2002 M. R. Brown <mrbrown@linux-sh.org>
8 * 8 *
9 * Some code taken from i386 version. 9 * This file is subject to the terms and conditions of the GNU General Public
10 * Copyright (C) 1991, 1992, 1995 Linus Torvalds 10 * License. See the file "COPYING" in the main directory of this archive
11 * for more details.
11 */ 12 */
12#include <linux/kernel.h> 13#include <linux/kernel.h>
13#include <linux/module.h> 14#include <linux/module.h>
@@ -23,7 +24,6 @@
23#include <asm/clock.h> 24#include <asm/clock.h>
24#include <asm/rtc.h> 25#include <asm/rtc.h>
25#include <asm/timer.h> 26#include <asm/timer.h>
26#include <asm/kgdb.h>
27 27
28struct sys_timer *sys_timer; 28struct sys_timer *sys_timer;
29 29
@@ -97,50 +97,6 @@ static int __init rtc_generic_init(void)
97} 97}
98module_init(rtc_generic_init); 98module_init(rtc_generic_init);
99 99
100/* last time the RTC clock got updated */
101static long last_rtc_update;
102
103/*
104 * handle_timer_tick() needs to keep up the real-time clock,
105 * as well as call the "do_timer()" routine every clocktick
106 */
107void handle_timer_tick(void)
108{
109 if (current->pid)
110 profile_tick(CPU_PROFILING);
111
112 /*
113 * Here we are in the timer irq handler. We just have irqs locally
114 * disabled but we don't know if the timer_bh is running on the other
115 * CPU. We need to avoid to SMP race with it. NOTE: we don' t need
116 * the irq version of write_lock because as just said we have irq
117 * locally disabled. -arca
118 */
119 write_seqlock(&xtime_lock);
120 do_timer(1);
121
122 /*
123 * If we have an externally synchronized Linux clock, then update
124 * RTC clock accordingly every ~11 minutes. Set_rtc_mmss() has to be
125 * called as close as possible to 500 ms before the new second starts.
126 */
127 if (ntp_synced() &&
128 xtime.tv_sec > last_rtc_update + 660 &&
129 (xtime.tv_nsec / 1000) >= 500000 - ((unsigned) TICK_SIZE) / 2 &&
130 (xtime.tv_nsec / 1000) <= 500000 + ((unsigned) TICK_SIZE) / 2) {
131 if (rtc_sh_set_time(xtime.tv_sec) == 0)
132 last_rtc_update = xtime.tv_sec;
133 else
134 /* do it again in 60s */
135 last_rtc_update = xtime.tv_sec - 600;
136 }
137 write_sequnlock(&xtime_lock);
138
139#ifndef CONFIG_SMP
140 update_process_times(user_mode(get_irq_regs()));
141#endif
142}
143
144#ifdef CONFIG_PM 100#ifdef CONFIG_PM
145int timer_suspend(struct sys_device *dev, pm_message_t state) 101int timer_suspend(struct sys_device *dev, pm_message_t state)
146{ 102{
@@ -242,4 +198,3 @@ void __init time_init(void)
242 198
243 late_time_init = sh_late_time_init; 199 late_time_init = sh_late_time_init;
244} 200}
245