From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759987AbcLBKq5 (ORCPT ); Fri, 2 Dec 2016 05:46:57 -0500 Received: from terminus.zytor.com ([198.137.202.10]:42188 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751731AbcLBKqz (ORCPT ); Fri, 2 Dec 2016 05:46:55 -0500 Date: Fri, 2 Dec 2016 02:46:16 -0800 From: tip-bot for Thomas Gleixner Message-ID: Cc: torvalds@linux-foundation.org, hpa@zytor.com, tglx@linutronix.de, rostedt@goodmis.org, mingo@kernel.org, ddaney@caviumnetworks.com, mark.rutland@arm.com, peterz@infradead.org, linux-kernel@vger.kernel.org, will.deacon@arm.com, bigeasy@linutronix.de Reply-To: bigeasy@linutronix.de, will.deacon@arm.com, linux-kernel@vger.kernel.org, peterz@infradead.org, mark.rutland@arm.com, mingo@kernel.org, rostedt@goodmis.org, ddaney@caviumnetworks.com, tglx@linutronix.de, hpa@zytor.com, torvalds@linux-foundation.org In-Reply-To: <20161130210030.509567906@linutronix.de> References: <20161130210030.509567906@linutronix.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:locking/core] locking/rtmutex: Get rid of RT_MUTEX_OWNER_MASKALL Git-Commit-ID: b5016e8203003c44264ec88fe2276ff54a51f689 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: b5016e8203003c44264ec88fe2276ff54a51f689 Gitweb: http://git.kernel.org/tip/b5016e8203003c44264ec88fe2276ff54a51f689 Author: Thomas Gleixner AuthorDate: Wed, 30 Nov 2016 21:04:44 +0000 Committer: Ingo Molnar CommitDate: Fri, 2 Dec 2016 11:13:57 +0100 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: 8161239a8bcc ("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 Acked-by: Peter Zijlstra (Intel) Cc: David Daney Cc: Linus Torvalds Cc: Mark Rutland Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: Steven Rostedt Cc: Will Deacon Link: http://lkml.kernel.org/r/20161130210030.509567906@linutronix.de Signed-off-by: Ingo Molnar --- kernel/locking/rtmutex_common.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel/locking/rtmutex_common.h b/kernel/locking/rtmutex_common.h index e317e1c..9901346 100644 --- a/kernel/locking/rtmutex_common.h +++ b/kernel/locking/rtmutex_common.h @@ -71,13 +71,12 @@ task_top_pi_waiter(struct task_struct *p) * lock->owner state tracking: */ #define RT_MUTEX_HAS_WAITERS 1UL -#define RT_MUTEX_OWNER_MASKALL 1UL static inline struct task_struct *rt_mutex_owner(struct rt_mutex *lock) { unsigned long owner = (unsigned long) READ_ONCE(lock->owner); - return (struct task_struct *) (owner & ~RT_MUTEX_OWNER_MASKALL); + return (struct task_struct *) (owner & ~RT_MUTEX_HAS_WAITERS); } /*