aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc/kernel/time.c
diff options
context:
space:
mode:
authorTony Luck <tony.luck@intel.com>2005-07-06 15:35:18 -0700
committerTony Luck <tony.luck@intel.com>2005-07-06 15:35:18 -0700
commit67d340f440f389e9d56201fb7c7aaa92f262feb1 (patch)
treea96c26a370beb23282a561ddd936e5d0aa93adde /arch/ppc/kernel/time.c
parent[IA64] restore_sigcontext is not preempt safe (diff)
parent[PATCH] Fix bt87x.c build problem for real (diff)
downloadlinux-dev-67d340f440f389e9d56201fb7c7aaa92f262feb1.tar.xz
linux-dev-67d340f440f389e9d56201fb7c7aaa92f262feb1.zip
Auto merge with /home/aegl/GIT/linus
Diffstat (limited to 'arch/ppc/kernel/time.c')
-rw-r--r--arch/ppc/kernel/time.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/arch/ppc/kernel/time.c b/arch/ppc/kernel/time.c
index 735866559199..bf4ddca5e853 100644
--- a/arch/ppc/kernel/time.c
+++ b/arch/ppc/kernel/time.c
@@ -89,6 +89,9 @@ unsigned long tb_to_ns_scale;
extern unsigned long wall_jiffies;
+/* used for timezone offset */
+static long timezone_offset;
+
DEFINE_SPINLOCK(rtc_lock);
EXPORT_SYMBOL(rtc_lock);
@@ -170,7 +173,7 @@ void timer_interrupt(struct pt_regs * regs)
xtime.tv_sec - last_rtc_update >= 659 &&
abs((xtime.tv_nsec / 1000) - (1000000-1000000/HZ)) < 500000/HZ &&
jiffies - wall_jiffies == 1) {
- if (ppc_md.set_rtc_time(xtime.tv_sec+1 + time_offset) == 0)
+ if (ppc_md.set_rtc_time(xtime.tv_sec+1 + timezone_offset) == 0)
last_rtc_update = xtime.tv_sec+1;
else
/* Try again one minute later */
@@ -286,7 +289,7 @@ void __init time_init(void)
unsigned old_stamp, stamp, elapsed;
if (ppc_md.time_init != NULL)
- time_offset = ppc_md.time_init();
+ timezone_offset = ppc_md.time_init();
if (__USE_RTC()) {
/* 601 processor: dec counts down by 128 every 128ns */
@@ -331,10 +334,10 @@ void __init time_init(void)
set_dec(tb_ticks_per_jiffy);
/* If platform provided a timezone (pmac), we correct the time */
- if (time_offset) {
- sys_tz.tz_minuteswest = -time_offset / 60;
+ if (timezone_offset) {
+ sys_tz.tz_minuteswest = -timezone_offset / 60;
sys_tz.tz_dsttime = 0;
- xtime.tv_sec -= time_offset;
+ xtime.tv_sec -= timezone_offset;
}
set_normalized_timespec(&wall_to_monotonic,
-xtime.tv_sec, -xtime.tv_nsec);