Skip to content

Commit

Permalink
fix a shutdown regression in intel_idle
Browse files Browse the repository at this point in the history
Fix a shutdown regression caused by 2a2d31c ("intel_idle: open
broadcast clock event").  The clockevent framework can automatically
shutdown broadcast timers for hotremove CPUs.  And we get a shutdown
regression when we shutdown broadcast timer for hot remove CPU, so just
delete some code.

Also fix some section mismatch.

Reported-by: Ari Savolainen <ari.m.savolainen@gmail.com>
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Tested-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Shaohua Li authored and Linus Torvalds committed Jan 24, 2011
1 parent 34686fe commit ec30f34
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions drivers/idle/intel_idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ static void __setup_broadcast_timer(void *arg)
clockevents_notify(reason, &cpu);
}

static int __cpuinit setup_broadcast_cpuhp_notify(struct notifier_block *n,
static int setup_broadcast_cpuhp_notify(struct notifier_block *n,
unsigned long action, void *hcpu)
{
int hotcpu = (unsigned long)hcpu;
Expand All @@ -273,15 +273,11 @@ static int __cpuinit setup_broadcast_cpuhp_notify(struct notifier_block *n,
smp_call_function_single(hotcpu, __setup_broadcast_timer,
(void *)true, 1);
break;
case CPU_DOWN_PREPARE:
smp_call_function_single(hotcpu, __setup_broadcast_timer,
(void *)false, 1);
break;
}
return NOTIFY_OK;
}

static struct notifier_block __cpuinitdata setup_broadcast_notifier = {
static struct notifier_block setup_broadcast_notifier = {
.notifier_call = setup_broadcast_cpuhp_notify,
};

Expand Down

0 comments on commit ec30f34

Please sign in to comment.