Skip to content

Commit

Permalink
[S390] cpu hotplug/idle: move cpu_die call to enabled context
Browse files Browse the repository at this point in the history
There is no difference if cpu_die is called from enabled or disabled
context. Except that the fast_gup code might be called via
cpu_die -> idle_task_exit -> __mm_drop -> crst_table_free. Which in
turn grabs and releases a spinlock using the _bh ops, which is not
allowed in irq disabled context, since spin_unlock_bh will
unconditionally enable interrupts again.
To get rid of the warning emitted by the softirq code just move the
code to enabled context.

In this case this doesn't fix a bug, we just get rid of a warning.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed Oct 25, 2010
1 parent 8021714 commit 6931be0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions arch/s390/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,17 @@ unsigned long thread_saved_pc(struct task_struct *tsk)
static void default_idle(void)
{
/* CPU is going idle. */
local_irq_disable();
if (need_resched()) {
local_irq_enable();
return;
}
#ifdef CONFIG_HOTPLUG_CPU
if (cpu_is_offline(smp_processor_id())) {
preempt_enable_no_resched();
cpu_die();
}
#endif
local_irq_disable();
if (need_resched()) {
local_irq_enable();
return;
}
local_mcck_disable();
if (test_thread_flag(TIF_MCCK_PENDING)) {
local_mcck_enable();
Expand Down

0 comments on commit 6931be0

Please sign in to comment.