aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/time.c
diff options
context:
space:
mode:
authorJohn Stultz <johnstul@us.ibm.com>2010-07-13 20:56:22 -0400
committerThomas Gleixner <tglx@linutronix.de>2010-07-27 06:40:54 -0400
commit06d518e3dfb25334282c7e38b4d7a4eada215f6d (patch)
tree4c8981a1f9514a95860818e075957a5454951c7d /arch/powerpc/kernel/time.c
parentb0797b60d0067fe437baa97a743c7d9de98fd769 (diff)
powerpc: Cleanup xtime usage
This removes powerpc's direct xtime usage, allowing for further generic timeekeping cleanups Signed-off-by: John Stultz <johnstul@us.ibm.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Anton Blanchard <anton@samba.org> LKML-Reference: <1279068988-21864-6-git-send-email-johnstul@us.ibm.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/powerpc/kernel/time.c')
-rw-r--r--arch/powerpc/kernel/time.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index 6fcd64886d1b..0711d60f40b0 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -864,9 +864,9 @@ void update_vsyscall(struct timespec *wall_time, struct clocksource *clock,
864 /* XXX this assumes clock->shift == 22 */ 864 /* XXX this assumes clock->shift == 22 */
865 /* 4611686018 ~= 2^(20+64-22) / 1e9 */ 865 /* 4611686018 ~= 2^(20+64-22) / 1e9 */
866 new_tb_to_xs = (u64) mult * 4611686018ULL; 866 new_tb_to_xs = (u64) mult * 4611686018ULL;
867 new_stamp_xsec = (u64) xtime.tv_nsec * XSEC_PER_SEC; 867 new_stamp_xsec = (u64) wall_time->tv_nsec * XSEC_PER_SEC;
868 do_div(new_stamp_xsec, 1000000000); 868 do_div(new_stamp_xsec, 1000000000);
869 new_stamp_xsec += (u64) xtime.tv_sec * XSEC_PER_SEC; 869 new_stamp_xsec += (u64) wall_time->tv_sec * XSEC_PER_SEC;
870 870
871 /* 871 /*
872 * tb_update_count is used to allow the userspace gettimeofday code 872 * tb_update_count is used to allow the userspace gettimeofday code
@@ -884,7 +884,7 @@ void update_vsyscall(struct timespec *wall_time, struct clocksource *clock,
884 vdso_data->tb_to_xs = new_tb_to_xs; 884 vdso_data->tb_to_xs = new_tb_to_xs;
885 vdso_data->wtom_clock_sec = wall_to_monotonic.tv_sec; 885 vdso_data->wtom_clock_sec = wall_to_monotonic.tv_sec;
886 vdso_data->wtom_clock_nsec = wall_to_monotonic.tv_nsec; 886 vdso_data->wtom_clock_nsec = wall_to_monotonic.tv_nsec;
887 vdso_data->stamp_xtime = xtime; 887 vdso_data->stamp_xtime = *wall_time;
888 smp_wmb(); 888 smp_wmb();
889 ++(vdso_data->tb_update_count); 889 ++(vdso_data->tb_update_count);
890} 890}
@@ -1093,7 +1093,7 @@ void __init time_init(void)
1093 vdso_data->tb_orig_stamp = tb_last_jiffy; 1093 vdso_data->tb_orig_stamp = tb_last_jiffy;
1094 vdso_data->tb_update_count = 0; 1094 vdso_data->tb_update_count = 0;
1095 vdso_data->tb_ticks_per_sec = tb_ticks_per_sec; 1095 vdso_data->tb_ticks_per_sec = tb_ticks_per_sec;
1096 vdso_data->stamp_xsec = (u64) xtime.tv_sec * XSEC_PER_SEC; 1096 vdso_data->stamp_xsec = (u64) get_seconds() * XSEC_PER_SEC;
1097 vdso_data->tb_to_xs = tb_to_xs; 1097 vdso_data->tb_to_xs = tb_to_xs;
1098 1098
1099 write_sequnlock_irqrestore(&xtime_lock, flags); 1099 write_sequnlock_irqrestore(&xtime_lock, flags);