diff options
author | Paul Mackerras <paulus@samba.org> | 2006-08-30 01:55:32 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-08-30 02:09:43 -0400 |
commit | e0d872d536bb93335d5905b09fe374a163486d43 (patch) | |
tree | c308e65872d65698095077cbfe36f38aa6da5f6f /include | |
parent | fea23bfefb4e98efd3c36f00ccc0b60281dc99da (diff) |
[POWERPC] Fix problem with time not advancing on 32-bit platforms
This fixes a problem introduced in 5db9fa9593e2ff69f2b95f9d59229dc4faaa564d.
The last_jiffy per-cpu variable is only 32 bits on 32-bit machines, but it
was being compared with a 64-bit quantity (tb_next_jiffy), which resulted in
time not advancing.
This fixes it by changing last_jiffy to be 64 bits on all platforms. With
this, we no longer need tb_last_stamp as a 32-bit version of tb_last_jiffy,
so this gets rid of tb_last_stamp and we just use tb_last_jiffy instead.
This also fixes a bug when the boot cpu is not online, because using
tb_last_stamp could have caused the wrong timebase origin value to be used
when calculating the time of day.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-powerpc/time.h | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/include/asm-powerpc/time.h b/include/asm-powerpc/time.h index dcde4410348d..5785ac4737b5 100644 --- a/include/asm-powerpc/time.h +++ b/include/asm-powerpc/time.h | |||
@@ -30,10 +30,6 @@ extern unsigned long tb_ticks_per_usec; | |||
30 | extern unsigned long tb_ticks_per_sec; | 30 | extern unsigned long tb_ticks_per_sec; |
31 | extern u64 tb_to_xs; | 31 | extern u64 tb_to_xs; |
32 | extern unsigned tb_to_us; | 32 | extern unsigned tb_to_us; |
33 | extern unsigned long tb_last_stamp; | ||
34 | extern u64 tb_last_jiffy; | ||
35 | |||
36 | DECLARE_PER_CPU(unsigned long, last_jiffy); | ||
37 | 33 | ||
38 | struct rtc_time; | 34 | struct rtc_time; |
39 | extern void to_tm(int tim, struct rtc_time * tm); | 35 | extern void to_tm(int tim, struct rtc_time * tm); |