diff options
author | Peter Zijlstra <peterz@infradead.org> | 2017-03-22 06:35:50 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2017-03-23 14:10:07 -0400 |
commit | fffa954fb528963c2fb7b0c0084eb77e2be7ab52 (patch) | |
tree | 6f79e09c1cdb2a04922ad13038cf301c5255d8c2 /kernel/locking/rtmutex.c | |
parent | 1b367ece0d7e696cab1c8501bab282cc6a538b3f (diff) |
futex: Remove rt_mutex_deadlock_account_*()
These are unused and clutter up the code.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: juri.lelli@arm.com
Cc: bigeasy@linutronix.de
Cc: xlpang@redhat.com
Cc: rostedt@goodmis.org
Cc: mathieu.desnoyers@efficios.com
Cc: jdesfossez@efficios.com
Cc: dvhart@infradead.org
Cc: bristot@redhat.com
Link: http://lkml.kernel.org/r/20170322104151.652692478@infradead.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/locking/rtmutex.c')
-rw-r--r-- | kernel/locking/rtmutex.c | 47 |
1 files changed, 18 insertions, 29 deletions
diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c index 6edc32ecd9c5..bab66cbe3b37 100644 --- a/kernel/locking/rtmutex.c +++ b/kernel/locking/rtmutex.c | |||
@@ -938,8 +938,6 @@ takeit: | |||
938 | */ | 938 | */ |
939 | rt_mutex_set_owner(lock, task); | 939 | rt_mutex_set_owner(lock, task); |
940 | 940 | ||
941 | rt_mutex_deadlock_account_lock(lock, task); | ||
942 | |||
943 | return 1; | 941 | return 1; |
944 | } | 942 | } |
945 | 943 | ||
@@ -1342,8 +1340,6 @@ static bool __sched rt_mutex_slowunlock(struct rt_mutex *lock, | |||
1342 | 1340 | ||
1343 | debug_rt_mutex_unlock(lock); | 1341 | debug_rt_mutex_unlock(lock); |
1344 | 1342 | ||
1345 | rt_mutex_deadlock_account_unlock(current); | ||
1346 | |||
1347 | /* | 1343 | /* |
1348 | * We must be careful here if the fast path is enabled. If we | 1344 | * We must be careful here if the fast path is enabled. If we |
1349 | * have no waiters queued we cannot set owner to NULL here | 1345 | * have no waiters queued we cannot set owner to NULL here |
@@ -1409,11 +1405,10 @@ rt_mutex_fastlock(struct rt_mutex *lock, int state, | |||
1409 | struct hrtimer_sleeper *timeout, | 1405 | struct hrtimer_sleeper *timeout, |
1410 | enum rtmutex_chainwalk chwalk)) | 1406 | enum rtmutex_chainwalk chwalk)) |
1411 | { | 1407 | { |
1412 | if (likely(rt_mutex_cmpxchg_acquire(lock, NULL, current))) { | 1408 | if (likely(rt_mutex_cmpxchg_acquire(lock, NULL, current))) |
1413 | rt_mutex_deadlock_account_lock(lock, current); | ||
1414 | return 0; | 1409 | return 0; |
1415 | } else | 1410 | |
1416 | return slowfn(lock, state, NULL, RT_MUTEX_MIN_CHAINWALK); | 1411 | return slowfn(lock, state, NULL, RT_MUTEX_MIN_CHAINWALK); |
1417 | } | 1412 | } |
1418 | 1413 | ||
1419 | static inline int | 1414 | static inline int |
@@ -1425,21 +1420,19 @@ rt_mutex_timed_fastlock(struct rt_mutex *lock, int state, | |||
1425 | enum rtmutex_chainwalk chwalk)) | 1420 | enum rtmutex_chainwalk chwalk)) |
1426 | { | 1421 | { |
1427 | if (chwalk == RT_MUTEX_MIN_CHAINWALK && | 1422 | if (chwalk == RT_MUTEX_MIN_CHAINWALK && |
1428 | likely(rt_mutex_cmpxchg_acquire(lock, NULL, current))) { | 1423 | likely(rt_mutex_cmpxchg_acquire(lock, NULL, current))) |
1429 | rt_mutex_deadlock_account_lock(lock, current); | ||
1430 | return 0; | 1424 | return 0; |
1431 | } else | 1425 | |
1432 | return slowfn(lock, state, timeout, chwalk); | 1426 | return slowfn(lock, state, timeout, chwalk); |
1433 | } | 1427 | } |
1434 | 1428 | ||
1435 | static inline int | 1429 | static inline int |
1436 | rt_mutex_fasttrylock(struct rt_mutex *lock, | 1430 | rt_mutex_fasttrylock(struct rt_mutex *lock, |
1437 | int (*slowfn)(struct rt_mutex *lock)) | 1431 | int (*slowfn)(struct rt_mutex *lock)) |
1438 | { | 1432 | { |
1439 | if (likely(rt_mutex_cmpxchg_acquire(lock, NULL, current))) { | 1433 | if (likely(rt_mutex_cmpxchg_acquire(lock, NULL, current))) |
1440 | rt_mutex_deadlock_account_lock(lock, current); | ||
1441 | return 1; | 1434 | return 1; |
1442 | } | 1435 | |
1443 | return slowfn(lock); | 1436 | return slowfn(lock); |
1444 | } | 1437 | } |
1445 | 1438 | ||
@@ -1449,19 +1442,18 @@ rt_mutex_fastunlock(struct rt_mutex *lock, | |||
1449 | struct wake_q_head *wqh)) | 1442 | struct wake_q_head *wqh)) |
1450 | { | 1443 | { |
1451 | DEFINE_WAKE_Q(wake_q); | 1444 | DEFINE_WAKE_Q(wake_q); |
1445 | bool deboost; | ||
1452 | 1446 | ||
1453 | if (likely(rt_mutex_cmpxchg_release(lock, current, NULL))) { | 1447 | if (likely(rt_mutex_cmpxchg_release(lock, current, NULL))) |
1454 | rt_mutex_deadlock_account_unlock(current); | 1448 | return; |
1455 | 1449 | ||
1456 | } else { | 1450 | deboost = slowfn(lock, &wake_q); |
1457 | bool deboost = slowfn(lock, &wake_q); | ||
1458 | 1451 | ||
1459 | wake_up_q(&wake_q); | 1452 | wake_up_q(&wake_q); |
1460 | 1453 | ||
1461 | /* Undo pi boosting if necessary: */ | 1454 | /* Undo pi boosting if necessary: */ |
1462 | if (deboost) | 1455 | if (deboost) |
1463 | rt_mutex_adjust_prio(current); | 1456 | rt_mutex_adjust_prio(current); |
1464 | } | ||
1465 | } | 1457 | } |
1466 | 1458 | ||
1467 | /** | 1459 | /** |
@@ -1572,10 +1564,9 @@ EXPORT_SYMBOL_GPL(rt_mutex_unlock); | |||
1572 | bool __sched rt_mutex_futex_unlock(struct rt_mutex *lock, | 1564 | bool __sched rt_mutex_futex_unlock(struct rt_mutex *lock, |
1573 | struct wake_q_head *wqh) | 1565 | struct wake_q_head *wqh) |
1574 | { | 1566 | { |
1575 | if (likely(rt_mutex_cmpxchg_release(lock, current, NULL))) { | 1567 | if (likely(rt_mutex_cmpxchg_release(lock, current, NULL))) |
1576 | rt_mutex_deadlock_account_unlock(current); | ||
1577 | return false; | 1568 | return false; |
1578 | } | 1569 | |
1579 | return rt_mutex_slowunlock(lock, wqh); | 1570 | return rt_mutex_slowunlock(lock, wqh); |
1580 | } | 1571 | } |
1581 | 1572 | ||
@@ -1637,7 +1628,6 @@ void rt_mutex_init_proxy_locked(struct rt_mutex *lock, | |||
1637 | __rt_mutex_init(lock, NULL); | 1628 | __rt_mutex_init(lock, NULL); |
1638 | debug_rt_mutex_proxy_lock(lock, proxy_owner); | 1629 | debug_rt_mutex_proxy_lock(lock, proxy_owner); |
1639 | rt_mutex_set_owner(lock, proxy_owner); | 1630 | rt_mutex_set_owner(lock, proxy_owner); |
1640 | rt_mutex_deadlock_account_lock(lock, proxy_owner); | ||
1641 | } | 1631 | } |
1642 | 1632 | ||
1643 | /** | 1633 | /** |
@@ -1657,7 +1647,6 @@ void rt_mutex_proxy_unlock(struct rt_mutex *lock, | |||
1657 | { | 1647 | { |
1658 | debug_rt_mutex_proxy_unlock(lock); | 1648 | debug_rt_mutex_proxy_unlock(lock); |
1659 | rt_mutex_set_owner(lock, NULL); | 1649 | rt_mutex_set_owner(lock, NULL); |
1660 | rt_mutex_deadlock_account_unlock(proxy_owner); | ||
1661 | } | 1650 | } |
1662 | 1651 | ||
1663 | /** | 1652 | /** |