Skip to content

Commit

Permalink
x86, uv: Remove recursion in uv_heartbeat_enable()
Browse files Browse the repository at this point in the history
The recursion is not needed and does not improve readability.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
LKML-Reference: <4B45F13E.3040202@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
  • Loading branch information
Roel Kluin authored and H. Peter Anvin committed Jan 7, 2010
1 parent e1e0138 commit 99659a9
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions arch/x86/kernel/apic/x2apic_uv_x.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,19 +475,18 @@ 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);
setup_timer(timer, uv_heartbeat, 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
Expand Down

0 comments on commit 99659a9

Please sign in to comment.