/* Encapsulate access to the itm structure for SMP.  */
void ia64_cpu_local_tick(void)
/* Encapsulate access to the itm structure for SMP.  */
void ia64_cpu_local_tick(void)
{
	int cpu = smp_processor_id();
	unsigned long shift = 0, delta;
	ia64_set_itv(IA64_TIMER_VECTOR);
	delta = local_cpu_data->itm_delta;
	if (cpu) {
		unsigned long hi = 1UL << ia64_fls(cpu);
		shift = (2*(cpu - hi) + 1) * delta/hi/2;
	}
	local_cpu_data->itm_next = ia64_get_itc() + delta + shift;
	ia64_set_itm(local_cpu_data->itm_next);
}