mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
[POWERPC] Fix problem with time not advancing on 32-bit platforms
This fixes a problem introduced in 5db9fa9593.
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 <[email protected]>
This commit is contained in:
parent
fea23bfefb
commit
e0d872d536
2 changed files with 8 additions and 21 deletions
|
|
@ -30,10 +30,6 @@ extern unsigned long tb_ticks_per_usec;
|
|||
extern unsigned long tb_ticks_per_sec;
|
||||
extern u64 tb_to_xs;
|
||||
extern unsigned tb_to_us;
|
||||
extern unsigned long tb_last_stamp;
|
||||
extern u64 tb_last_jiffy;
|
||||
|
||||
DECLARE_PER_CPU(unsigned long, last_jiffy);
|
||||
|
||||
struct rtc_time;
|
||||
extern void to_tm(int tim, struct rtc_time * tm);
|
||||
|
|
|
|||
Loading…
Reference in a new issue