From ee93b43a05506667d771c4fb0c384301edd7d036 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Thu, 30 Jun 2005 02:58:49 -0700 Subject: [PATCH] ppc32: use correct register names in arch/ppc/kernel/relocate_kernel.S CONFIG_KEXEC=y doesnt work: arch/ppc/kernel/relocate_kernel.S:37: Error: unsupported relocation against SRR1 arch/ppc/kernel/relocate_kernel.S:39: Error: unsupported relocation against SRR0 Signed-off-by: Olaf Hering Cc: "Eric W. Biederman" Cc: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/ppc/kernel/relocate_kernel.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/ppc/kernel') diff --git a/arch/ppc/kernel/relocate_kernel.S b/arch/ppc/kernel/relocate_kernel.S index 7ff69c4af920..9b2ad48e988c 100644 --- a/arch/ppc/kernel/relocate_kernel.S +++ b/arch/ppc/kernel/relocate_kernel.S @@ -34,9 +34,9 @@ relocate_new_kernel: mr r8, r0 ori r8, r8, MSR_RI|MSR_ME - mtspr SRR1, r8 + mtspr SPRN_SRR1, r8 addi r8, r4, 1f - relocate_new_kernel - mtspr SRR0, r8 + mtspr SPRN_SRR0, r8 sync rfi -- cgit v1.2.3 From f326d22b8cc5bfebfa5b3f6a4066dc737def2234 Mon Sep 17 00:00:00 2001 From: john stultz Date: Tue, 5 Jul 2005 18:54:44 -0700 Subject: [PATCH] ppc32: stop misusing NTP's time_offset value As part of my timeofday rework, I've been looking at the NTP code and I noticed that the PPC architecture is apparently misusing the NTP's time_offset (it is a terrible name!) value as some form of timezone offset. This could cause problems when time_offset changed by the NTP code. This patch changes the PPC code so it uses a more clear local variable: timezone_offset. Signed-off-by: John Stultz Acked-by: Tom Rini Cc: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/ppc/kernel/time.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'arch/ppc/kernel') 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); -- cgit v1.2.3