Skip to content

Commit 924aed1

Browse files
Peter ZijlstraIngo Molnar
Peter Zijlstra
authored and
Ingo Molnar
committed
cpuidle, cpu_pm: Remove RCU fiddling from cpu_pm_{enter,exit}()
All callers should still have RCU enabled. Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Tested-by: Tony Lindgren <[email protected]> Tested-by: Ulf Hansson <[email protected]> Reviewed-by: Ulf Hansson <[email protected]> Acked-by: Mark Rutland <[email protected]> Acked-by: Rafael J. Wysocki <[email protected]> Acked-by: Frederic Weisbecker <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent a01353c commit 924aed1

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

Diff for: kernel/cpu_pm.c

-9
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,9 @@ static int cpu_pm_notify(enum cpu_pm_event event)
3030
{
3131
int ret;
3232

33-
/*
34-
* This introduces a RCU read critical section, which could be
35-
* disfunctional in cpu idle. Copy RCU_NONIDLE code to let RCU know
36-
* this.
37-
*/
38-
ct_irq_enter_irqson();
3933
rcu_read_lock();
4034
ret = raw_notifier_call_chain(&cpu_pm_notifier.chain, event, NULL);
4135
rcu_read_unlock();
42-
ct_irq_exit_irqson();
4336

4437
return notifier_to_errno(ret);
4538
}
@@ -49,11 +42,9 @@ static int cpu_pm_notify_robust(enum cpu_pm_event event_up, enum cpu_pm_event ev
4942
unsigned long flags;
5043
int ret;
5144

52-
ct_irq_enter_irqson();
5345
raw_spin_lock_irqsave(&cpu_pm_notifier.lock, flags);
5446
ret = raw_notifier_call_chain_robust(&cpu_pm_notifier.chain, event_up, event_down, NULL);
5547
raw_spin_unlock_irqrestore(&cpu_pm_notifier.lock, flags);
56-
ct_irq_exit_irqson();
5748

5849
return notifier_to_errno(ret);
5950
}

0 commit comments

Comments
 (0)