From nobody Sun Feb 8 13:48:17 2026 Received: from fhigh-b7-smtp.messagingengine.com (fhigh-b7-smtp.messagingengine.com [202.12.124.158]) (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 4B3F3267B89; Wed, 31 Dec 2025 08:32:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.158 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767169937; cv=none; b=O5GbpfoTPp+kECYscmn4jtfGFoL1pAiFdCPYs8JXiE99G1X3ukGCdfksA3Rne47jo1FFR2HT5D0ZQw1h93YsmbmTlJ7lbMVPSgOGeV4kzF1JOFYMajkkMejSxcKSu5KfCfx5A0bf/3DEfbyE/gOyuxMJQM/Jb0UsfM9msCuPixc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767169937; c=relaxed/simple; bh=6BaawB/5vhO7v/rumx07zT9BPZyyoYZDc4iUgex6uao=; h=To:Cc:Message-ID:In-Reply-To:References:From:Subject:Date; b=OjFnRPQ8e24yjHgfo0103QL9GTksGZzQ29zMFXVOfxCTvRBlt+pgnv9s2H4JDoWryJHhvxP50juwzyvZAiHFuV3TbfoB9nTSLo2dR4PMVAqe9HnWnEfqKSv9C3ZZ47ZUHR9iy5lsWaVnt3IkUa3xdHuXoFSSBLkHRCJqWdImyeg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org; spf=none smtp.mailfrom=linux-m68k.org; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=r1tTti8U; arc=none smtp.client-ip=202.12.124.158 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux-m68k.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="r1tTti8U" Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfhigh.stl.internal (Postfix) with ESMTP id D5DB77A00DD; Wed, 31 Dec 2025 03:32:13 -0500 (EST) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-01.internal (MEProxy); Wed, 31 Dec 2025 03:32:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1767169933; x= 1767256333; bh=nL9oXUgaQPIU6S4mzvMLiKSGthFWHu05i1DeuxQmtGs=; b=r 1tTti8Up8Zi+al8bvnYxDoJW3Jw48pwJGUd3uU2witdKmm68bwDFvju56NN7BRti hHfPal/dtoP0W4H6uCHkO7JiPXgYCv3i1z/V9mAS3+xJiQgErXtp3pmkBHAMzsbV mEm1zpriUVrKMVmHQF6w+ISYDrtS4T0Twevykb/r4Vr74jc8nVWKNFd/OA2iXUmK Uv9XooUtQO8+rdETxdEsVhqtQKLwOQ40u0KqWuVmLrx1Nz9iFiC5wctEQb67JuBc uosJaU6N1SztN4DIFQA7hsM/DzpXn67S1THmmUTSL9yYyxLgc3DrkDwIQ4Ig1M+q L4LRldDsdeso1zdw32oJA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdekvdegfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefvvefkjghfhffuffestddtredttddttdenucfhrhhomhephfhinhhnucfvhhgrihhn uceofhhthhgrihhnsehlihhnuhigqdhmieekkhdrohhrgheqnecuggftrfgrthhtvghrnh epvefggfdthffhfeevuedugfdtuefgfeettdevkeeigefgudelteeggeeuheegffffnecu vehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepfhhthhgrih hnsehlihhnuhigqdhmieekkhdrohhrghdpnhgspghrtghpthhtohepvdegpdhmohguvgep shhmthhpohhuthdprhgtphhtthhopegrkhhpmheslhhinhhugidqfhhouhhnuggrthhioh hnrdhorhhgpdhrtghpthhtohepphgvthgvrhiisehinhhfrhgruggvrggurdhorhhgpdhr tghpthhtohepfihilhhlsehkvghrnhgvlhdrohhrghdprhgtphhtthhopegrrhhnugesrg hrnhgusgdruggvpdhrtghpthhtohepsghoqhhunhdrfhgvnhhgsehgmhgrihhlrdgtohhm pdhrtghpthhtohepghgrrhihsehgrghrhihguhhordhnvghtpdhrtghpthhtohepmhgrrh hkrdhruhhtlhgrnhgusegrrhhmrdgtohhmpdhrtghpthhtoheplhhinhhugidqrghrtghh sehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvg hlsehvghgvrhdrkhgvrhhnvghlrdhorhhg X-ME-Proxy: Feedback-ID: i58a146ae:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 31 Dec 2025 03:32:11 -0500 (EST) To: Andrew Morton , Peter Zijlstra , Will Deacon Cc: Arnd Bergmann , Boqun Feng , Gary Guo , Mark Rutland , linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org, Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Geert Uytterhoeven , bpf@vger.kernel.org Message-ID: <5803c4a180975f102bc8f78a3251540f0396fa46.1767169542.git.fthain@linux-m68k.org> In-Reply-To: References: From: Finn Thain Subject: [PATCH v6 1/4] bpf: Explicitly align bpf_res_spin_lock Date: Wed, 31 Dec 2025 19:25:42 +1100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Align bpf_res_spin_lock to avoid a BUILD_BUG_ON() when the alignment changes, as it will do on m68k when, in a subsequent patch, the minimum alignment of the atomic_t member of struct rqspinlock gets increased from 2 to 4. Drop the BUILD_BUG_ON() as it becomes redundant. Cc: Geert Uytterhoeven Cc: linux-m68k@lists.linux-m68k.org Acked-by: Alexei Starovoitov Reviewed-by: Arnd Bergmann Signed-off-by: Finn Thain --- Changed since v5: - Added tag from Arnd Bergmann. --- include/asm-generic/rqspinlock.h | 2 +- kernel/bpf/rqspinlock.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/include/asm-generic/rqspinlock.h b/include/asm-generic/rqspinl= ock.h index 0f2dcbbfee2f..dd36ac96bf66 100644 --- a/include/asm-generic/rqspinlock.h +++ b/include/asm-generic/rqspinlock.h @@ -28,7 +28,7 @@ struct rqspinlock { */ struct bpf_res_spin_lock { u32 val; -}; +} __aligned(__alignof__(struct rqspinlock)); =20 struct qspinlock; #ifdef CONFIG_QUEUED_SPINLOCKS diff --git a/kernel/bpf/rqspinlock.c b/kernel/bpf/rqspinlock.c index f7d0c8d4644e..8d892fb099ac 100644 --- a/kernel/bpf/rqspinlock.c +++ b/kernel/bpf/rqspinlock.c @@ -694,7 +694,6 @@ __bpf_kfunc int bpf_res_spin_lock(struct bpf_res_spin_l= ock *lock) int ret; =20 BUILD_BUG_ON(sizeof(rqspinlock_t) !=3D sizeof(struct bpf_res_spin_lock)); - BUILD_BUG_ON(__alignof__(rqspinlock_t) !=3D __alignof__(struct bpf_res_sp= in_lock)); =20 preempt_disable(); ret =3D res_spin_lock((rqspinlock_t *)lock); --=20 2.49.1