Skip to content

Commit b5016e8

Browse files
KAGA-KOKOingomolnar
authored andcommitted
locking/rtmutex: Get rid of RT_MUTEX_OWNER_MASKALL
This is a left over from the original rtmutex implementation which used both bit0 and bit1 in the owner pointer. Commit: 8161239 ("rtmutex: Simplify PI algorithm and make highest prio task get lock") ... removed the usage of bit1, but kept the extra mask around. This is confusing at best. Remove it and just use RT_MUTEX_HAS_WAITERS for the masking. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: David Daney <ddaney@caviumnetworks.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Sebastian Siewior <bigeasy@linutronix.de> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Will Deacon <will.deacon@arm.com> Link: http://lkml.kernel.org/r/20161130210030.509567906@linutronix.de Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent 1b95b1a commit b5016e8

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎kernel/locking/rtmutex_common.h‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,12 @@ task_top_pi_waiter(struct task_struct *p)
7171
* lock->owner state tracking:
7272
*/
7373
#define RT_MUTEX_HAS_WAITERS 1UL
74-
#define RT_MUTEX_OWNER_MASKALL 1UL
7574

7675
static inline struct task_struct *rt_mutex_owner(struct rt_mutex *lock)
7776
{
7877
unsigned long owner = (unsigned long) READ_ONCE(lock->owner);
7978

80-
return (struct task_struct *) (owner & ~RT_MUTEX_OWNER_MASKALL);
79+
return (struct task_struct *) (owner & ~RT_MUTEX_HAS_WAITERS);
8180
}
8281

8382
/*

0 commit comments

Comments
 (0)