Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4a0e6377 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by John Stultz
Browse files

clocksource: Get rid of cycle_last



cycle_last was added to the clocksource to support the TSC
validation. We moved that to the core code, so we can get rid of the
extra copy.

Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
parent 09ec5442
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -224,7 +224,7 @@ void update_vsyscall(struct timekeeper *tk)
	vdso_data->wtm_clock_nsec		= tk->wall_to_monotonic.tv_nsec;

	if (!use_syscall) {
		vdso_data->cs_cycle_last	= tk->clock->cycle_last;
		vdso_data->cs_cycle_last	= tk->cycle_last;
		vdso_data->xtime_clock_sec	= tk->xtime_sec;
		vdso_data->xtime_clock_nsec	= tk->xtime_nsec;
		vdso_data->cs_mult		= tk->mult;
+2 −2
Original line number Diff line number Diff line
@@ -441,7 +441,7 @@ void update_vsyscall_tz(void)
}

void update_vsyscall_old(struct timespec *wall, struct timespec *wtm,
			struct clocksource *c, u32 mult)
			 struct clocksource *c, u32 mult, cycles_t cycle_last)
{
	write_seqcount_begin(&fsyscall_gtod_data.seq);

@@ -450,7 +450,7 @@ void update_vsyscall_old(struct timespec *wall, struct timespec *wtm,
        fsyscall_gtod_data.clk_mult = mult;
        fsyscall_gtod_data.clk_shift = c->shift;
        fsyscall_gtod_data.clk_fsys_mmio = c->archdata.fsys_mmio;
        fsyscall_gtod_data.clk_cycle_last = c->cycle_last;
        fsyscall_gtod_data.clk_cycle_last = cycle_last;

	/* copy kernel time structures */
        fsyscall_gtod_data.wall_time.tv_sec = wall->tv_sec;
+2 −2
Original line number Diff line number Diff line
@@ -741,7 +741,7 @@ static cycle_t timebase_read(struct clocksource *cs)
}

void update_vsyscall_old(struct timespec *wall_time, struct timespec *wtm,
			struct clocksource *clock, u32 mult)
			 struct clocksource *clock, u32 mult, cycle_t cycle_last)
{
	u64 new_tb_to_xs, new_stamp_xsec;
	u32 frac_sec;
@@ -774,7 +774,7 @@ void update_vsyscall_old(struct timespec *wall_time, struct timespec *wtm,
	 * We expect the caller to have done the first increment of
	 * vdso_data->tb_update_count already.
	 */
	vdso_data->tb_orig_stamp = clock->cycle_last;
	vdso_data->tb_orig_stamp = cycle_last;
	vdso_data->stamp_xsec = new_stamp_xsec;
	vdso_data->tb_to_xs = new_tb_to_xs;
	vdso_data->wtom_clock_sec = wtm->tv_sec;
+1 −1
Original line number Diff line number Diff line
@@ -220,7 +220,7 @@ void update_vsyscall(struct timekeeper *tk)
	/* Make userspace gettimeofday spin until we're done. */
	++vdso_data->tb_update_count;
	smp_wmb();
	vdso_data->xtime_tod_stamp = tk->clock->cycle_last;
	vdso_data->xtime_tod_stamp = tk->cycle_last;
	vdso_data->xtime_clock_sec = tk->xtime_sec;
	vdso_data->xtime_clock_nsec = tk->xtime_nsec;
	vdso_data->wtom_clock_sec =
+1 −1
Original line number Diff line number Diff line
@@ -269,7 +269,7 @@ void update_vsyscall(struct timekeeper *tk)
	/* Userspace gettimeofday will spin while this value is odd. */
	++vdso_data->tb_update_count;
	smp_wmb();
	vdso_data->xtime_tod_stamp = clock->cycle_last;
	vdso_data->xtime_tod_stamp = tk->cycle_last;
	vdso_data->xtime_clock_sec = tk->xtime_sec;
	vdso_data->xtime_clock_nsec = tk->xtime_nsec;
	vdso_data->wtom_clock_sec = wtm->tv_sec;
Loading