/* Unless you're the timekeeping code, you should not be using this!  */
static void timekeeper_setup_internals(struct clocksource *clock)
/* Unless you're the timekeeping code, you should not be using this!  */
static void timekeeper_setup_internals(struct clocksource *clock)
{
	cycle_t interval;
	u64 tmp;
	timekeeper.clock = clock;
	clock->cycle_last = clock->read(clock);
	tmp = NTP_INTERVAL_LENGTH;
	tmp <<= clock->shift;
	tmp += clock->mult/2;
	do_div(tmp, clock->mult);
	if (tmp == 0)
		tmp = 1;
	interval = (cycle_t) tmp;
	timekeeper.cycle_interval = interval;
	timekeeper.xtime_interval = (u64) interval * clock->mult;
	timekeeper.raw_interval =
		((u64) interval * clock->mult) >> clock->shift;
	timekeeper.xtime_nsec = 0;
	timekeeper.shift = clock->shift;
	timekeeper.ntp_error = 0;
	timekeeper.ntp_error_shift = NTP_SCALE_SHIFT - clock->shift;
	timekeeper.mult = clock->mult;
}