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

Commit 99659a92 authored by Roel Kluin's avatar Roel Kluin Committed by H. Peter Anvin
Browse files

x86, uv: Remove recursion in uv_heartbeat_enable()



The recursion is not needed and does not improve readability.

Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
LKML-Reference: <4B45F13E.3040202@gmail.com>
Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
parent e1e0138d
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -475,7 +475,7 @@ static void uv_heartbeat(unsigned long ignored)

static void __cpuinit uv_heartbeat_enable(int cpu)
{
	if (!uv_cpu_hub_info(cpu)->scir.enabled) {
	while (!uv_cpu_hub_info(cpu)->scir.enabled) {
		struct timer_list *timer = &uv_cpu_hub_info(cpu)->scir.timer;

		uv_set_cpu_scir_bits(cpu, SCIR_CPU_HEARTBEAT|SCIR_CPU_ACTIVITY);
@@ -483,11 +483,10 @@ static void __cpuinit uv_heartbeat_enable(int cpu)
		timer->expires = jiffies + SCIR_CPU_HB_INTERVAL;
		add_timer_on(timer, cpu);
		uv_cpu_hub_info(cpu)->scir.enabled = 1;
	}

	/* check boot cpu */
	if (!uv_cpu_hub_info(0)->scir.enabled)
		uv_heartbeat_enable(0);
		/* also ensure that boot cpu is enabled */
		cpu = 0;
	}
}

#ifdef CONFIG_HOTPLUG_CPU