diff --git a/kernel/cpu_pm.c b/kernel/cpu_pm.c index 9da42f83ee03..d1d1c3961553 100644 --- a/kernel/cpu_pm.c +++ b/kernel/cpu_pm.c @@ -28,8 +28,15 @@ static int cpu_pm_notify(enum cpu_pm_event event, int nr_to_call, int *nr_calls) { int ret; + /* + * __atomic_notifier_call_chain has a RCU read critical section, which + * could be disfunctional in cpu idle. Copy RCU_NONIDLE code to let + * RCU know this. + */ + rcu_irq_enter_irqson(); ret = __atomic_notifier_call_chain(&cpu_pm_notifier_chain, event, NULL, nr_to_call, nr_calls); + rcu_irq_exit_irqson(); return notifier_to_errno(ret); } diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index 2c6be169bdc7..75c990b00525 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c @@ -1951,6 +1951,11 @@ static void migrate_hrtimer_list(struct hrtimer_clock_base *old_base, /* Clear the migration state bit */ timer->state &= ~HRTIMER_STATE_MIGRATE; } +#ifdef CONFIG_PREEMPT_RT_BASE + list_splice_tail(&old_base->expired, &new_base->expired); + if (!list_empty(&new_base->expired)) + raise_softirq_irqoff(HRTIMER_SOFTIRQ); +#endif } static void migrate_hrtimers(int scpu) diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 6bdcab98501c..90e261c8811e 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -363,7 +363,7 @@ static void workqueue_sysfs_unregister(struct workqueue_struct *wq); "RCU or wq->mutex should be held") #define assert_rcu_or_wq_mutex_or_pool_mutex(wq) \ - rcu_lockdep_assert(rcu_read_lock_sched_held() || \ + rcu_lockdep_assert(rcu_read_lock_held() || \ lockdep_is_held(&wq->mutex) || \ lockdep_is_held(&wq_pool_mutex), \ "sched RCU, wq->mutex or wq_pool_mutex should be held") diff --git a/localversion-rt b/localversion-rt index 75493460c41f..66a5ed8bf3d7 100644 --- a/localversion-rt +++ b/localversion-rt @@ -1 +1 @@ --rt51 +-rt52