Skip to content

Commit 6931be0

Browse files
heicarstMartin Schwidefsky
authored andcommitted
[S390] cpu hotplug/idle: move cpu_die call to enabled context
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>
1 parent 8021714 commit 6931be0

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎arch/s390/kernel/process.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,17 +76,17 @@ unsigned long thread_saved_pc(struct task_struct *tsk)
7676
static void default_idle(void)
7777
{
7878
/* CPU is going idle. */
79-
local_irq_disable();
80-
if (need_resched()) {
81-
local_irq_enable();
82-
return;
83-
}
8479
#ifdef CONFIG_HOTPLUG_CPU
8580
if (cpu_is_offline(smp_processor_id())) {
8681
preempt_enable_no_resched();
8782
cpu_die();
8883
}
8984
#endif
85+
local_irq_disable();
86+
if (need_resched()) {
87+
local_irq_enable();
88+
return;
89+
}
9090
local_mcck_disable();
9191
if (test_thread_flag(TIF_MCCK_PENDING)) {
9292
local_mcck_enable();

0 commit comments

Comments
 (0)