summaryrefslogtreecommitdiff
path: root/arch/s390
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2020-11-20 13:50:35 +0300
committerPeter Zijlstra <peterz@infradead.org>2020-11-24 18:47:35 +0300
commit58c644ba512cfbc2e39b758dd979edd1d6d00e27 (patch)
treeb632d972a2114cb536746cc4127d8d3ddf0f626c /arch/s390
parent43be4388e94b915799a24f0eaf664bf95b85231f (diff)
downloadlinux-58c644ba512cfbc2e39b758dd979edd1d6d00e27.tar.xz
sched/idle: Fix arch_cpu_idle() vs tracing
We call arch_cpu_idle() with RCU disabled, but then use local_irq_{en,dis}able(), which invokes tracing, which relies on RCU. Switch all arch_cpu_idle() implementations to use raw_local_irq_{en,dis}able() and carefully manage the lockdep,rcu,tracing state like we do in entry. (XXX: we really should change arch_cpu_idle() to not return with interrupts enabled) Reported-by: Sven Schnelle <svens@linux.ibm.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Mark Rutland <mark.rutland@arm.com> Tested-by: Mark Rutland <mark.rutland@arm.com> Link: https://lkml.kernel.org/r/20201120114925.594122626@infradead.org
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/kernel/idle.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/s390/kernel/idle.c b/arch/s390/kernel/idle.c
index f7f1e64e0d98..2b85096964f8 100644
--- a/arch/s390/kernel/idle.c
+++ b/arch/s390/kernel/idle.c
@@ -33,10 +33,10 @@ void enabled_wait(void)
PSW_MASK_IO | PSW_MASK_EXT | PSW_MASK_MCHECK;
clear_cpu_flag(CIF_NOHZ_DELAY);
- local_irq_save(flags);
+ raw_local_irq_save(flags);
/* Call the assembler magic in entry.S */
psw_idle(idle, psw_mask);
- local_irq_restore(flags);
+ raw_local_irq_restore(flags);
/* Account time spent with enabled wait psw loaded as idle time. */
raw_write_seqcount_begin(&idle->seqcount);
@@ -123,7 +123,7 @@ void arch_cpu_idle_enter(void)
void arch_cpu_idle(void)
{
enabled_wait();
- local_irq_enable();
+ raw_local_irq_enable();
}
void arch_cpu_idle_exit(void)