diff options
Diffstat (limited to 'arch/ppc/kernel')
-rw-r--r-- | arch/ppc/kernel/machine_kexec.c | 6 | ||||
-rw-r--r-- | arch/ppc/kernel/relocate_kernel.S | 4 | ||||
-rw-r--r-- | arch/ppc/kernel/time.c | 13 |
3 files changed, 16 insertions, 7 deletions
diff --git a/arch/ppc/kernel/machine_kexec.c b/arch/ppc/kernel/machine_kexec.c index 84d65a87191e..a72787747df7 100644 --- a/arch/ppc/kernel/machine_kexec.c +++ b/arch/ppc/kernel/machine_kexec.c | |||
@@ -28,6 +28,12 @@ typedef NORET_TYPE void (*relocate_new_kernel_t)( | |||
28 | const extern unsigned char relocate_new_kernel[]; | 28 | const extern unsigned char relocate_new_kernel[]; |
29 | const extern unsigned int relocate_new_kernel_size; | 29 | const extern unsigned int relocate_new_kernel_size; |
30 | 30 | ||
31 | /* | ||
32 | * Provide a dummy crash_notes definition while crash dump arrives to ppc. | ||
33 | * This prevents breakage of crash_notes attribute in kernel/ksysfs.c. | ||
34 | */ | ||
35 | void *crash_notes = NULL; | ||
36 | |||
31 | void machine_shutdown(void) | 37 | void machine_shutdown(void) |
32 | { | 38 | { |
33 | if (ppc_md.machine_shutdown) | 39 | if (ppc_md.machine_shutdown) |
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: | |||
34 | 34 | ||
35 | mr r8, r0 | 35 | mr r8, r0 |
36 | ori r8, r8, MSR_RI|MSR_ME | 36 | ori r8, r8, MSR_RI|MSR_ME |
37 | mtspr SRR1, r8 | 37 | mtspr SPRN_SRR1, r8 |
38 | addi r8, r4, 1f - relocate_new_kernel | 38 | addi r8, r4, 1f - relocate_new_kernel |
39 | mtspr SRR0, r8 | 39 | mtspr SPRN_SRR0, r8 |
40 | sync | 40 | sync |
41 | rfi | 41 | rfi |
42 | 42 | ||
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; | |||
89 | 89 | ||
90 | extern unsigned long wall_jiffies; | 90 | extern unsigned long wall_jiffies; |
91 | 91 | ||
92 | /* used for timezone offset */ | ||
93 | static long timezone_offset; | ||
94 | |||
92 | DEFINE_SPINLOCK(rtc_lock); | 95 | DEFINE_SPINLOCK(rtc_lock); |
93 | 96 | ||
94 | EXPORT_SYMBOL(rtc_lock); | 97 | EXPORT_SYMBOL(rtc_lock); |
@@ -170,7 +173,7 @@ void timer_interrupt(struct pt_regs * regs) | |||
170 | xtime.tv_sec - last_rtc_update >= 659 && | 173 | xtime.tv_sec - last_rtc_update >= 659 && |
171 | abs((xtime.tv_nsec / 1000) - (1000000-1000000/HZ)) < 500000/HZ && | 174 | abs((xtime.tv_nsec / 1000) - (1000000-1000000/HZ)) < 500000/HZ && |
172 | jiffies - wall_jiffies == 1) { | 175 | jiffies - wall_jiffies == 1) { |
173 | if (ppc_md.set_rtc_time(xtime.tv_sec+1 + time_offset) == 0) | 176 | if (ppc_md.set_rtc_time(xtime.tv_sec+1 + timezone_offset) == 0) |
174 | last_rtc_update = xtime.tv_sec+1; | 177 | last_rtc_update = xtime.tv_sec+1; |
175 | else | 178 | else |
176 | /* Try again one minute later */ | 179 | /* Try again one minute later */ |
@@ -286,7 +289,7 @@ void __init time_init(void) | |||
286 | unsigned old_stamp, stamp, elapsed; | 289 | unsigned old_stamp, stamp, elapsed; |
287 | 290 | ||
288 | if (ppc_md.time_init != NULL) | 291 | if (ppc_md.time_init != NULL) |
289 | time_offset = ppc_md.time_init(); | 292 | timezone_offset = ppc_md.time_init(); |
290 | 293 | ||
291 | if (__USE_RTC()) { | 294 | if (__USE_RTC()) { |
292 | /* 601 processor: dec counts down by 128 every 128ns */ | 295 | /* 601 processor: dec counts down by 128 every 128ns */ |
@@ -331,10 +334,10 @@ void __init time_init(void) | |||
331 | set_dec(tb_ticks_per_jiffy); | 334 | set_dec(tb_ticks_per_jiffy); |
332 | 335 | ||
333 | /* If platform provided a timezone (pmac), we correct the time */ | 336 | /* If platform provided a timezone (pmac), we correct the time */ |
334 | if (time_offset) { | 337 | if (timezone_offset) { |
335 | sys_tz.tz_minuteswest = -time_offset / 60; | 338 | sys_tz.tz_minuteswest = -timezone_offset / 60; |
336 | sys_tz.tz_dsttime = 0; | 339 | sys_tz.tz_dsttime = 0; |
337 | xtime.tv_sec -= time_offset; | 340 | xtime.tv_sec -= timezone_offset; |
338 | } | 341 | } |
339 | set_normalized_timespec(&wall_to_monotonic, | 342 | set_normalized_timespec(&wall_to_monotonic, |
340 | -xtime.tv_sec, -xtime.tv_nsec); | 343 | -xtime.tv_sec, -xtime.tv_nsec); |