@@ -2205,19 +2205,10 @@ extern int __cond_resched_rwlock_write(rwlock_t *lock) __must_hold(lock);
22052205
22062206#ifndef CONFIG_PREEMPT_RT
22072207
2208- /*
2209- * With proxy exec, if a task has been proxy-migrated, it may be a donor
2210- * on a cpu that it can't actually run on. Thus we need a special state
2211- * to denote that the task is being woken, but that it needs to be
2212- * evaluated for return-migration before it is run. So if the task is
2213- * blocked_on PROXY_WAKING, return migrate it before running it.
2214- */
2215- #define PROXY_WAKING ((struct mutex *)(-1L))
2216-
22172208static inline struct mutex * __get_task_blocked_on (struct task_struct * p )
22182209{
22192210 lockdep_assert_held_once (& p -> blocked_lock );
2220- return p -> blocked_on == PROXY_WAKING ? NULL : p -> blocked_on ;
2211+ return p -> blocked_on ;
22212212}
22222213
22232214static inline void __set_task_blocked_on (struct task_struct * p , struct mutex * m )
@@ -2245,7 +2236,7 @@ static inline void __clear_task_blocked_on(struct task_struct *p, struct mutex *
22452236 * blocked_on relationships, but make sure we are not
22462237 * clearing the relationship with a different lock.
22472238 */
2248- WARN_ON_ONCE (m && p -> blocked_on && p -> blocked_on != m && p -> blocked_on != PROXY_WAKING );
2239+ WARN_ON_ONCE (m && p -> blocked_on && p -> blocked_on != m );
22492240 p -> blocked_on = NULL ;
22502241}
22512242
@@ -2254,35 +2245,6 @@ static inline void clear_task_blocked_on(struct task_struct *p, struct mutex *m)
22542245 guard (raw_spinlock_irqsave )(& p -> blocked_lock );
22552246 __clear_task_blocked_on (p , m );
22562247}
2257-
2258- static inline void __set_task_blocked_on_waking (struct task_struct * p , struct mutex * m )
2259- {
2260- /* Currently we serialize blocked_on under the task::blocked_lock */
2261- lockdep_assert_held_once (& p -> blocked_lock );
2262-
2263- if (!sched_proxy_exec ()) {
2264- __clear_task_blocked_on (p , m );
2265- return ;
2266- }
2267-
2268- /* Don't set PROXY_WAKING if blocked_on was already cleared */
2269- if (!p -> blocked_on )
2270- return ;
2271- /*
2272- * There may be cases where we set PROXY_WAKING on tasks that were
2273- * already set to waking, but make sure we are not changing
2274- * the relationship with a different lock.
2275- */
2276- WARN_ON_ONCE (m && p -> blocked_on != m && p -> blocked_on != PROXY_WAKING );
2277- p -> blocked_on = PROXY_WAKING ;
2278- }
2279-
2280- static inline void set_task_blocked_on_waking (struct task_struct * p , struct mutex * m )
2281- {
2282- guard (raw_spinlock_irqsave )(& p -> blocked_lock );
2283- __set_task_blocked_on_waking (p , m );
2284- }
2285-
22862248#else
22872249static inline void __clear_task_blocked_on (struct task_struct * p , struct rt_mutex * m )
22882250{
@@ -2291,14 +2253,6 @@ static inline void __clear_task_blocked_on(struct task_struct *p, struct rt_mute
22912253static inline void clear_task_blocked_on (struct task_struct * p , struct rt_mutex * m )
22922254{
22932255}
2294-
2295- static inline void __set_task_blocked_on_waking (struct task_struct * p , struct rt_mutex * m )
2296- {
2297- }
2298-
2299- static inline void set_task_blocked_on_waking (struct task_struct * p , struct rt_mutex * m )
2300- {
2301- }
23022256#endif /* !CONFIG_PREEMPT_RT */
23032257
23042258static __always_inline bool need_resched (void )
0 commit comments