Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp3148963pxb; Sat, 9 Oct 2021 03:10:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZhAPmiRn5f7VKkNpndqcXyVqgSrz3Ul1xpoNuecprwOvtmlyvx/Rpyu2hQGkl9pFhtL3A X-Received: by 2002:a50:d984:: with SMTP id w4mr22299558edj.375.1633774206867; Sat, 09 Oct 2021 03:10:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633774206; cv=none; d=google.com; s=arc-20160816; b=f96rA0jeFKX/3TrbN/c2n7JZg1tPTfpOTErk+pHjFkzcNaT6HtK8ufo9lDuUkTeglH xQmZ33Dzx5ktE9Ux3nrxMgjo7Nz22gIXnNpGsa78UskH/I4pTapEDSTerv1WnLAU9rKw cemJoE+v7YHbZ9HrXoA39afvWzeSowcnO2Y2E06Yn1Hv21L1dt0xci+v9F/k9XEm2kQ3 lBln+WrgmvWaemqK/u6Y83QgKKUn+uRiJsbLIadJ5jWyM0FeYgR9VaYOIXP3AIIhHMYa 8e1NXIuhwfBXiFhvH/uq6GGG2oXls25ab/LTmO8eUCD/5mO6co1QrAY4j0iolIfFWiBc Lv1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=osy18yqCLWOmKWiKks6dQ/O1Tj+IDx0OaYcVaNEo5Sk=; b=OP3BAfUPKpC3zDX7X998fVyKidsmX/CWOx0ZhXLXdcVPHmHS2bJl2kzzVHTMNh9HVI 0CBAEkBZ6ny8lz5Qm1AQqwNaTKHCNFBEZpJFORYOlEibSfIkZYbZ1nQI8jI1i62RIpec OaGESuQC+Faw+zmMEGj85vbamHHTl0sDRoYxrFcp1ShA+2s0DaiAoJDPWRIT+JMnMhRY HVTMM84M58B4dVI9OzctCfsFK6yChMKLsYFir1nbfPgkIfvdd2kJRhhSsc5oO9HWskIX ee6jWaFmMVYZ0VfBzFrdHXHOLxqcCbEWCkodUhofMMy4kcIyjOT2ND1srQ15IvRIkqR3 cRTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=jw6P+3bY; dkim=neutral (no key) header.i=@linutronix.de header.b="MJ/JVl5P"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qk12si4312342ejc.56.2021.10.09.03.09.43; Sat, 09 Oct 2021 03:10:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=jw6P+3bY; dkim=neutral (no key) header.i=@linutronix.de header.b="MJ/JVl5P"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232373AbhJIKJt (ORCPT + 99 others); Sat, 9 Oct 2021 06:09:49 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:49368 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244545AbhJIKJI (ORCPT ); Sat, 9 Oct 2021 06:09:08 -0400 Date: Sat, 09 Oct 2021 10:07:10 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1633774031; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=osy18yqCLWOmKWiKks6dQ/O1Tj+IDx0OaYcVaNEo5Sk=; b=jw6P+3bYbMsKYwWVYj6QEWqt+iMnGX/gfl6QLea7qYvZSogrhUsYtYTcQnQc1dvMDu3MVB M9JIQXQ01QBzie1+0h1xnFd5GzQQ+mp4Qk1Z+F7al1+1HGg9Mf1MDbSfwyLSrdgAvYsNZO mQxLnxxg7EhD4sXrl4D84pMVfV87OENcuM67zuFmG4pnS/Jm7owTp8AHpj34vb0WkAiIF3 hO47hl4+Ri/+uXUNnctBGimYVLG9e7yr/Ao5/6dcJ33v0XQaa90Za9O+HXMHNF/0/J42fC iiufrQPAYAui+V9XwxURiNcqr1zDWikI3Tq4xsEu+kAXmNwrqO1YsAXIwCjl8w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1633774031; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=osy18yqCLWOmKWiKks6dQ/O1Tj+IDx0OaYcVaNEo5Sk=; b=MJ/JVl5Pzw9fJxKGfldJUMzW+SoNtEVRSeYXNwWDEewC3UZTX7GYXHYBMkDQl6nSIs/DFU +Wbg53Na0so9JMCA== From: "tip-bot2 for Peter Zijlstra" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: locking/core] futex: Rename: hb_waiter_{inc,dec,pending}() Cc: "Peter Zijlstra (Intel)" , andrealmeid@collabora.com, x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20210923171111.300673-11-andrealmeid@collabora.com> References: <20210923171111.300673-11-andrealmeid@collabora.com> MIME-Version: 1.0 Message-ID: <163377403019.25758.11473171142618165722.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the locking/core branch of tip: Commit-ID: 832c0542c0f71f7d2ba10e987a1ab520813e6bd7 Gitweb: https://git.kernel.org/tip/832c0542c0f71f7d2ba10e987a1ab520813= e6bd7 Author: Peter Zijlstra AuthorDate: Thu, 23 Sep 2021 14:10:59 -03:00 Committer: Peter Zijlstra CommitterDate: Thu, 07 Oct 2021 13:51:09 +02:00 futex: Rename: hb_waiter_{inc,dec,pending}() In order to prepare introducing these symbols into the global namespace; rename them: s/hb_waiters_/futex_&/g Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Andr=C3=A9 Almeida Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Andr=C3=A9 Almeida Link: https://lore.kernel.org/r/20210923171111.300673-11-andrealmeid@collabor= a.com --- kernel/futex/core.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/kernel/futex/core.c b/kernel/futex/core.c index a8ca5b5..a26045e 100644 --- a/kernel/futex/core.c +++ b/kernel/futex/core.c @@ -115,8 +115,8 @@ * waiters--; (b) unlock(hash_bucket(futex)); * * Where (A) orders the waiters increment and the futex value read through - * atomic operations (see hb_waiters_inc) and where (B) orders the write - * to futex and the waiters read (see hb_waiters_pending()). + * atomic operations (see futex_hb_waiters_inc) and where (B) orders the wri= te + * to futex and the waiters read (see futex_hb_waiters_pending()). * * This yields the following case (where X:=3Dwaiters, Y:=3Dfutex): * @@ -272,7 +272,7 @@ late_initcall(fail_futex_debugfs); /* * Reflects a new waiter being added to the waitqueue. */ -static inline void hb_waiters_inc(struct futex_hash_bucket *hb) +static inline void futex_hb_waiters_inc(struct futex_hash_bucket *hb) { #ifdef CONFIG_SMP atomic_inc(&hb->waiters); @@ -287,14 +287,14 @@ static inline void hb_waiters_inc(struct futex_hash_buc= ket *hb) * Reflects a waiter being removed from the waitqueue by wakeup * paths. */ -static inline void hb_waiters_dec(struct futex_hash_bucket *hb) +static inline void futex_hb_waiters_dec(struct futex_hash_bucket *hb) { #ifdef CONFIG_SMP atomic_dec(&hb->waiters); #endif } =20 -static inline int hb_waiters_pending(struct futex_hash_bucket *hb) +static inline int futex_hb_waiters_pending(struct futex_hash_bucket *hb) { #ifdef CONFIG_SMP /* @@ -723,7 +723,7 @@ static void __futex_unqueue(struct futex_q *q) =20 hb =3D container_of(q->lock_ptr, struct futex_hash_bucket, lock); plist_del(&q->list, &hb->chain); - hb_waiters_dec(hb); + futex_hb_waiters_dec(hb); } =20 /* @@ -802,7 +802,7 @@ int futex_wake(u32 __user *uaddr, unsigned int flags, int= nr_wake, u32 bitset) hb =3D futex_hash(&key); =20 /* Make sure we really have tasks to wakeup */ - if (!hb_waiters_pending(hb)) + if (!futex_hb_waiters_pending(hb)) return ret; =20 spin_lock(&hb->lock); @@ -979,8 +979,8 @@ void requeue_futex(struct futex_q *q, struct futex_hash_b= ucket *hb1, */ if (likely(&hb1->chain !=3D &hb2->chain)) { plist_del(&q->list, &hb1->chain); - hb_waiters_dec(hb1); - hb_waiters_inc(hb2); + futex_hb_waiters_dec(hb1); + futex_hb_waiters_inc(hb2); plist_add(&q->list, &hb2->chain); q->lock_ptr =3D &hb2->lock; } @@ -1341,7 +1341,7 @@ retry: hb2 =3D futex_hash(&key2); =20 retry_private: - hb_waiters_inc(hb2); + futex_hb_waiters_inc(hb2); double_lock_hb(hb1, hb2); =20 if (likely(cmpval !=3D NULL)) { @@ -1351,7 +1351,7 @@ retry_private: =20 if (unlikely(ret)) { double_unlock_hb(hb1, hb2); - hb_waiters_dec(hb2); + futex_hb_waiters_dec(hb2); =20 ret =3D get_user(curval, uaddr1); if (ret) @@ -1437,7 +1437,7 @@ retry_private: */ case -EFAULT: double_unlock_hb(hb1, hb2); - hb_waiters_dec(hb2); + futex_hb_waiters_dec(hb2); ret =3D fault_in_user_writeable(uaddr2); if (!ret) goto retry; @@ -1451,7 +1451,7 @@ retry_private: * - EAGAIN: The user space value changed. */ double_unlock_hb(hb1, hb2); - hb_waiters_dec(hb2); + futex_hb_waiters_dec(hb2); /* * Handle the case where the owner is in the middle of * exiting. Wait for the exit to complete otherwise @@ -1570,7 +1570,7 @@ retry_private: out_unlock: double_unlock_hb(hb1, hb2); wake_up_q(&wake_q); - hb_waiters_dec(hb2); + futex_hb_waiters_dec(hb2); return ret ? ret : task_count; } =20 @@ -1590,7 +1590,7 @@ struct futex_hash_bucket *futex_q_lock(struct futex_q *= q) * decrement the counter at futex_q_unlock() when some error has * occurred and we don't end up adding the task to the list. */ - hb_waiters_inc(hb); /* implies smp_mb(); (A) */ + futex_hb_waiters_inc(hb); /* implies smp_mb(); (A) */ =20 q->lock_ptr =3D &hb->lock; =20 @@ -1602,7 +1602,7 @@ void futex_q_unlock(struct futex_hash_bucket *hb) __releases(&hb->lock) { spin_unlock(&hb->lock); - hb_waiters_dec(hb); + futex_hb_waiters_dec(hb); } =20 void __futex_queue(struct futex_q *q, struct futex_hash_bucket *hb) @@ -1932,7 +1932,7 @@ int handle_early_requeue_pi_wakeup(struct futex_hash_bu= cket *hb, * Unqueue the futex_q and determine which it was. */ plist_del(&q->list, &hb->chain); - hb_waiters_dec(hb); + futex_hb_waiters_dec(hb); =20 /* Handle spurious wakeups gracefully */ ret =3D -EWOULDBLOCK;