From nobody Mon Apr 6 19:59:13 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9727037646B; Wed, 18 Mar 2026 08:02:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773820973; cv=none; b=kKlL/48Ckdeia065pdTiZXsfoVcUsPvpxBmnxR55bSnvB00itTs/LM+T9bhsAOZjGncr63XuP+QmcsJ1ChO+gu2Qg+ub43qyQAJwIRK+GGltlIZymZ54rZ+85+x5aZV+LH7xAITr3gwSasr0yKl7wXSgH8T0/0EJH15wePmcKPc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773820973; c=relaxed/simple; bh=DxtT1rUH0v9lo1xfnp8gUBy+fZz1o8Frq58yJkyTg2A=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=fBPcmWraoCqWW4ilxf7upotcKMLUDtJMc/MA4LHpuHqOir2Bip2CIg+PSSW3ILeShcVPUgBHqw8Mnl6R9cnFn7zPsuuXcJKeSlyR8Yn5JAJ1GlbWXPdbg2a/4cYePKeCBZRad7Ue3G4jWCCC71LnLNUqLaFVn+AdDyUq1eexZr4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=ZAiCito2; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Lt2qpbAA; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="ZAiCito2"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Lt2qpbAA" Date: Wed, 18 Mar 2026 08:02:48 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1773820969; 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=MUNe6p4YGxGq9L9yykI2KTI6+CWy0enBkP/f2unvKIk=; b=ZAiCito2cScIFR0tzDnQm3/m8A7X+Xth/IM1TniovnN0mbUwLT9uOjOLWO967FyAmraFzY 10azX7j4Na+PYPXggGXe3e1db+jVz6GC8NwebuW9MVbD7DFTHTnulTxRht7gsMTnD8vTfi 941EWu/nMutm1V6y5ijjwmb0Wl4/W6KqYZ9rYiCRsrCmcUCbGnrI0iKYMi5h8raY+K5tzS 8Tf8watZ4BC4wd/jXBepD/UPJbdErGwSf1gwLitg5qeUs8ueUb63xpk3WDtx1LofXs/LGF kLGB6+btEIvM+p/sfvjgXDqwGpkMLSyDHHwQH5DkiLzv/ysIFvpdf28M0wBZ/Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1773820969; 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=MUNe6p4YGxGq9L9yykI2KTI6+CWy0enBkP/f2unvKIk=; b=Lt2qpbAA8Jr3mZ8bwf8XxMO4mbHdmtKDuJNWjrHcODrYuL56drye2rUUN4kLEx8rsrnHKb SHXizc6NYGwil4Ag== From: "tip-bot2 for Bart Van Assche" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: locking/core] locking: Fix rwlock support in Cc: Bart Van Assche , "Peter Zijlstra (Intel)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260313171510.230998-2-bvanassche@acm.org> References: <20260313171510.230998-2-bvanassche@acm.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <177382096856.1647592.8720459521430172313.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the locking/core branch of tip: Commit-ID: 756a0e011cfca0b45a48464aa25b05d9a9c2fb0b Gitweb: https://git.kernel.org/tip/756a0e011cfca0b45a48464aa25b05d9a= 9c2fb0b Author: Bart Van Assche AuthorDate: Fri, 13 Mar 2026 10:15:07 -07:00 Committer: Peter Zijlstra CommitterDate: Mon, 16 Mar 2026 13:16:50 +01:00 locking: Fix rwlock support in Architecture support for rwlocks must be available whether or not CONFIG_DEBUG_SPINLOCK has been defined. Move the definitions of the arch_{read,write}_{lock,trylock,unlock}() macros such that these become visbile if CONFIG_DEBUG_SPINLOCK=3Dn. This patch prepares for converting do_raw_{read,write}_trylock() into inline functions. Without this patch that conversion triggers a build failure for UP architectures, e.g. arm-ep93xx. I used the following kernel configuration to build the kernel for that architecture: CONFIG_ARCH_MULTIPLATFORM=3Dy CONFIG_ARCH_MULTI_V7=3Dn CONFIG_ATAGS=3Dy CONFIG_MMU=3Dy CONFIG_ARCH_MULTI_V4T=3Dy CONFIG_CPU_LITTLE_ENDIAN=3Dy CONFIG_ARCH_EP93XX=3Dy Fixes: fb1c8f93d869 ("[PATCH] spinlock consolidation") Signed-off-by: Bart Van Assche Signed-off-by: Peter Zijlstra (Intel) Link: https://patch.msgid.link/20260313171510.230998-2-bvanassche@acm.org --- include/linux/spinlock_up.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/include/linux/spinlock_up.h b/include/linux/spinlock_up.h index 1e84e71..3a50976 100644 --- a/include/linux/spinlock_up.h +++ b/include/linux/spinlock_up.h @@ -48,16 +48,6 @@ static inline void arch_spin_unlock(arch_spinlock_t *loc= k) lock->slock =3D 1; } =20 -/* - * Read-write spinlocks. No debug version. - */ -#define arch_read_lock(lock) do { barrier(); (void)(lock); } while (0) -#define arch_write_lock(lock) do { barrier(); (void)(lock); } while (0) -#define arch_read_trylock(lock) ({ barrier(); (void)(lock); 1; }) -#define arch_write_trylock(lock) ({ barrier(); (void)(lock); 1; }) -#define arch_read_unlock(lock) do { barrier(); (void)(lock); } while (0) -#define arch_write_unlock(lock) do { barrier(); (void)(lock); } while (0) - #else /* DEBUG_SPINLOCK */ #define arch_spin_is_locked(lock) ((void)(lock), 0) /* for sched/core.c and kernel_lock.c: */ @@ -68,4 +58,14 @@ static inline void arch_spin_unlock(arch_spinlock_t *loc= k) =20 #define arch_spin_is_contended(lock) (((void)(lock), 0)) =20 +/* + * Read-write spinlocks. No debug version. + */ +#define arch_read_lock(lock) do { barrier(); (void)(lock); } while (0) +#define arch_write_lock(lock) do { barrier(); (void)(lock); } while (0) +#define arch_read_trylock(lock) ({ barrier(); (void)(lock); 1; }) +#define arch_write_trylock(lock) ({ barrier(); (void)(lock); 1; }) +#define arch_read_unlock(lock) do { barrier(); (void)(lock); } while (0) +#define arch_write_unlock(lock) do { barrier(); (void)(lock); } while (0) + #endif /* __LINUX_SPINLOCK_UP_H */