From nobody Sat Feb 7 21:53:05 2026 Received: from fout-b6-smtp.messagingengine.com (fout-b6-smtp.messagingengine.com [202.12.124.149]) (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 DF2492ED86E; Mon, 20 Oct 2025 22:36:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.149 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760999769; cv=none; b=jkgK2lSY14L8qRV5ERyfs5mEjCXbJi09LV9PgmkQ+1gct17RMjccShT74aRSPSqrlkNJsfH4k+ZCCCF4BuktC2cXzghInJ1GVaTsGPBcWFPYZw9FsPx5x0o8KQ++3bKEfU4Q37cxdaQdxxATylO9HcVP90ZPiBE4oh0onj6t9Tg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760999769; c=relaxed/simple; bh=oAbST0+JKJTESwBm/MGfnCEeNdAFwq9mPXtX42hpaxc=; h=To:Cc:Message-ID:In-Reply-To:References:From:Subject:Date; b=Ad4/yb/Q/Hn5aiw76lty6mcSEZ0iTfjNtw5+SLWrHf2H8GKHOt6gqihSoWwjsUb3MrWrg5tABcm5g46RPInisf9T865C/W+OPhSYDjzLkk+OyVmgapiVOfRXQR9C1lKygTUPKoLQy9YtMIQmetqp0DdZ7bExAxlfZ+3wijzsVw4= 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=SkAbctiN; arc=none smtp.client-ip=202.12.124.149 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="SkAbctiN" Received: from phl-compute-12.internal (phl-compute-12.internal [10.202.2.52]) by mailfout.stl.internal (Postfix) with ESMTP id 4C5EF1D00171; Mon, 20 Oct 2025 18:36:05 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-12.internal (MEProxy); Mon, 20 Oct 2025 18:36:05 -0400 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=1760999765; x= 1761086165; bh=hZe/xPiV9af0NGQdc+AfTV2g1Y0rwHK7nJNIcATbYOc=; b=S kAbctiNvsln/6UOsZUJ3lqpKOe95dTwLJaw8SQ9aTHpX9Cd/Onqu6tNorGpkojYI XOfLOx5o3fSP3tIYF79nqrd936DhITZVkBYfIZ78Mf8QQp4QfzllkjDjb5E70PZP m2cMbc8PZ1ZBpL8xXnHYOqkuFpYI0NaYKa1E4b5T22oPttNiIB0gox6lj7xiP6u8 k20vw8+InycTefwtk5rO5ix75Gim5cvP0Rt2qlOMv8Vs+i6LfJzCjpUbziNEid30 le3DuSOxmg+PkzUqfgF4LQKw3pWk6W5ohW9L3O0QdSj1vO87lZ1iDzHiMmEJsxSJ fpeBf0ijonVu6wDGfoOJg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddufeeltdegucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepvfevkfgjfhfhufffsedttdertddttddtnecuhfhrohhmpefhihhnnhcuvfhhrghi nhcuoehfthhhrghinheslhhinhhugidqmheikehkrdhorhhgqeenucggtffrrghtthgvrh hnpeevgffgtdfhhfefveeuudfgtdeugfeftedtveekieeggfduleetgeegueehgeffffen ucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehfthhhrg hinheslhhinhhugidqmheikehkrdhorhhgpdhnsggprhgtphhtthhopedugedpmhhouggv pehsmhhtphhouhhtpdhrtghpthhtohepphgvthgvrhiisehinhhfrhgruggvrggurdhorh hgpdhrtghpthhtohepfihilhhlsehkvghrnhgvlhdrohhrghdprhgtphhtthhopegrkhhp mheslhhinhhugidqfhhouhhnuggrthhiohhnrdhorhhgpdhrtghpthhtoheprghrnhguse grrhhnuggsrdguvgdprhgtphhtthhopegsohhquhhnrdhfvghnghesghhmrghilhdrtgho mhdprhgtphhtthhopehgvggvrhhtsehlihhnuhigqdhmieekkhdrohhrghdprhgtphhtth hopehlihhnuhigqdgrrhgthhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthho pehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtth hopehlihhnuhigqdhmieekkhesvhhgvghrrdhkvghrnhgvlhdrohhrgh X-ME-Proxy: Feedback-ID: i58a146ae:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 20 Oct 2025 18:36:01 -0400 (EDT) To: Peter Zijlstra , Will Deacon Cc: Andrew Morton , Arnd Bergmann , Boqun Feng , Geert Uytterhoeven , linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-m68k@vger.kernel.org, Mark Rutland , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , bpf@vger.kernel.org Message-ID: <4ad2b350b2b4123058d56c15ab092de9a882f5c8.1760999284.git.fthain@linux-m68k.org> In-Reply-To: References: From: Finn Thain Subject: [RFC v4 1/5] bpf: Explicitly align bpf_res_spin_lock Date: Tue, 21 Oct 2025 09:28:04 +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 is now redundant. Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Andrii Nakryiko Acked-by: Alexei Starovoitov --- 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 6d4244d643df..eac2dcd31b83 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 a00561b1d3e5..02f1f671e624 100644 --- a/kernel/bpf/rqspinlock.c +++ b/kernel/bpf/rqspinlock.c @@ -692,7 +692,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 From nobody Sat Feb 7 21:53:05 2026 Received: from fhigh-b5-smtp.messagingengine.com (fhigh-b5-smtp.messagingengine.com [202.12.124.156]) (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 EF7E42F39A4; Mon, 20 Oct 2025 22:36:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.156 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760999780; cv=none; b=uHSUVSEgARs9SzYSn+KktUFrFhb+6puT4w0ttlqCyods4xcC/u6bGJBbqwBdyGyjq6wiDq+5ATj1seSvfq40dWzjSxlstrp1p5F68QaP7D0fL65nwUjEJszrPZXM1qqUfZlZlH1gsWW56TkfU23ao8hs4+SSw6DZaPVL66xOzyc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760999780; c=relaxed/simple; bh=Ds40lvVQ8ct4/JMQM6+DhsSpkMtda2d+9Lt4Ht9DnyM=; h=To:Cc:Message-ID:In-Reply-To:References:From:Subject:Date; b=YwvtfJJGL5eiNUECS2fmW8MX5DO1/IfPk1W3InpZT08B2LIG0u9R5qD/1rGQVRU5adH4Ivdwy35kF3YJ0Bs0eg16+5OlJSqryjRP1LuXF5nB2VjovgcqEyoaIkPlAuXKGPlgYav9G2fduym7tzeTtONCaIiDhNDWtRx0UzQlUzg= 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=bjxMXWw6; arc=none smtp.client-ip=202.12.124.156 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="bjxMXWw6" Received: from phl-compute-12.internal (phl-compute-12.internal [10.202.2.52]) by mailfhigh.stl.internal (Postfix) with ESMTP id B6DC57A0133; Mon, 20 Oct 2025 18:36:16 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-12.internal (MEProxy); Mon, 20 Oct 2025 18:36:17 -0400 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=1760999776; x= 1761086176; bh=sCEkbZKrl8bKnVzNmi1Kw704fMBYVAIdlc+QSCIPujs=; b=b jxMXWw6NFgPgWlWIleVc5chc/9HyOBYg4QfUexgH7mW9G7DwDFLUs6WoHP7R8Dtr vZ1mpPHNEO32cKKWTGz5KkSxj44VP8A6DpSnDmkPiKfj1Grh3g09d7BRvr6Osl1J lMNhboHYycxPoMbgkR62/+qKldWsgONUhK23vIp40NmiInBmAQ3os+OKu0S/ZIjX OZ0y+ebfoFVEJ3GZNVg4s6YEVxGyX+UYwOu8WAiJVRQT+SBayG3j8VlW918OCzQ9 O2KB2EHehfsoBCiQBzNmqFTn6prHdQrPOVziONsj1xuvjC0fFbLRspfC576OYlOD RiZHjWcrhJpSw2GuHEedw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddufeeltdegucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepvfevkfgjfhfhufffsedttdertddttddtnecuhfhrohhmpefhihhnnhcuvfhhrghi nhcuoehfthhhrghinheslhhinhhugidqmheikehkrdhorhhgqeenucggtffrrghtthgvrh hnpeevgffgtdfhhfefveeuudfgtdeugfeftedtveekieeggfduleetgeegueehgeffffen ucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpehfthhhrg hinheslhhinhhugidqmheikehkrdhorhhgpdhnsggprhgtphhtthhopedufedpmhhouggv pehsmhhtphhouhhtpdhrtghpthhtohepphgvthgvrhiisehinhhfrhgruggvrggurdhorh hgpdhrtghpthhtohepfihilhhlsehkvghrnhgvlhdrohhrghdprhgtphhtthhopehjrghm vghsrdgsohhtthhomhhlvgihsehhrghnshgvnhhprghrthhnvghrshhhihhprdgtohhmpd hrtghpthhtohepuggvlhhlvghrsehgmhigrdguvgdprhgtphhtthhopegrkhhpmheslhhi nhhugidqfhhouhhnuggrthhiohhnrdhorhhgpdhrtghpthhtoheprghrnhgusegrrhhnug gsrdguvgdprhgtphhtthhopegsohhquhhnrdhfvghnghesghhmrghilhdrtghomhdprhgt phhtthhopehgvggvrhhtsehlihhnuhigqdhmieekkhdrohhrghdprhgtphhtthhopehlih hnuhigqdgrrhgthhesvhhgvghrrdhkvghrnhgvlhdrohhrgh X-ME-Proxy: Feedback-ID: i58a146ae:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 20 Oct 2025 18:36:13 -0400 (EDT) To: Peter Zijlstra , Will Deacon , "James E.J. Bottomley" , Helge Deller Cc: Andrew Morton , Arnd Bergmann , Boqun Feng , Geert Uytterhoeven , linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-m68k@vger.kernel.org, Mark Rutland , linux-parisc@vger.kernel.org Message-ID: In-Reply-To: References: From: Finn Thain Subject: [RFC v4 2/5] parisc: Drop linux/kernel.h include from asm/bug.h header Date: Tue, 21 Oct 2025 09:28:04 +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" This patch series will add WARN_ON_ONCE() calls to the header file linux/instrumented.h. That requires including linux/bug.h, but doing so causes the following compiler error on parisc: In file included from ./include/linux/atomic/atomic-instrumented.h:17, from ./include/linux/atomic.h:82, from ./arch/parisc/include/asm/bitops.h:13, from ./include/linux/bitops.h:67, from ./include/linux/kernel.h:23, from ./arch/parisc/include/asm/bug.h:5, from ./include/linux/bug.h:5, from ./include/linux/page-flags.h:10, from kernel/bounds.c:10: ./include/linux/instrumented.h: In function 'instrument_atomic_alignment_ch= eck': ./include/linux/instrumented.h:69:9: error: implicit declaration of functio= n 'WARN_ON_ONCE' [-Werror=3Dimplicit-function-declaration] 69 | WARN_ON_ONCE((unsigned long)v & (size - 1)); | ^~~~~~~~~~~~ cc1: some warnings being treated as errors make[3]: *** [scripts/Makefile.build:182: kernel/bounds.s] Error 1 The problem is, asm/bug.h indirectly includes atomic-instrumented.h, which means a new cycle appeared in the graph of #includes. And because some headers in the cycle can't see all definitions, WARN_ON_ONCE() appears to be an undeclared function. This only happens on parisc and it's easy to fix. In the error message above, linux/kernel.h is included by asm/bug.h. But it's no longer needed there, so remove it. The comment about needing BUGFLAG_TAINT seems to be incorrect as of commit 19d436268dde ("debug: Add _ONCE() logic to report_bug()"). Also, a comment in linux/kernel.h strongly discourages its use here. Compile-tested only. Acked-by: Helge Deller # parisc --- arch/parisc/include/asm/bug.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/parisc/include/asm/bug.h b/arch/parisc/include/asm/bug.h index 833555f74ffa..dbf65623c513 100644 --- a/arch/parisc/include/asm/bug.h +++ b/arch/parisc/include/asm/bug.h @@ -2,8 +2,6 @@ #ifndef _PARISC_BUG_H #define _PARISC_BUG_H =20 -#include /* for BUGFLAG_TAINT */ - /* * Tell the user there is some problem. * The offending file and line are encoded in the __bug_table section. --=20 2.49.1 From nobody Sat Feb 7 21:53:05 2026 Received: from fhigh-b5-smtp.messagingengine.com (fhigh-b5-smtp.messagingengine.com [202.12.124.156]) (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 12C7F2F39A4; Mon, 20 Oct 2025 22:36:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.156 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760999791; cv=none; b=CJHGaK/ZcuCdcXum8wLb0xY0bKQJkhybQtnCjUt3SvYxVVfrZqCQE2YsO2iTPCuK0tokLST6IZ0zWNqtBYu5g36BJG57jcv+/ZwLD73Scd6EExdoKhkBBt6khJmXzyA9c/NrzleSteykZMbC8j/eW2DwkSxcLAqitckvXZksKYI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760999791; c=relaxed/simple; bh=Ydj+Z+1cn0WqStqIF6lMy1qCSLA8Th69lMVWd5rfERY=; h=To:Cc:Message-ID:In-Reply-To:References:From:Subject:Date; b=agI+IPN16+mj2S3y8izyYsAw99Yul8xzSZWGma771e8DvVVfEYkvO2gwk15yNnI40lqYBeRR7o12uJ2cmLBF+zp73qfQbpmHPStj7KGaUmhpMlsF3KYLQZqeWbYFCul22uFAnZLVHmHIto1wE5Uh+whAOnr19CVq0DkjXCSKF78= 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=Up9ZbkoA; arc=none smtp.client-ip=202.12.124.156 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="Up9ZbkoA" Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.stl.internal (Postfix) with ESMTP id D11F77A00F6; Mon, 20 Oct 2025 18:36:28 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-04.internal (MEProxy); Mon, 20 Oct 2025 18:36:29 -0400 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=1760999788; x= 1761086188; bh=OaA31fhO0Mk2O5tNJntGr4vvAQnj5OF5mMtZDb1L75o=; b=U p9ZbkoA5ag1XAaL6oy81lbqC9Wnm+HQ9N0tWr3Hyd6bEvZF6PH63MTNeR7jRNp7+ O0cbV5LvNgxwiKDxvKmKH+Xg9olHjaP07bX9Kw20Nkk14/mErm4Djd0aTjLUIxGP CIAQjWOLDeWU3WrnyZSf1VTm+Gz8U19dhcTbk/4P4xoTUB5n49VhDx/T5+nzQMq+ wKTVYx206Xwcz4OmpgToZ+ScissnCj2Uu+OhaMtT87J3MgHXFzSAG+4S5IV6oSIk 9UjfyIQTjXAziWe+8G4d7HkoXGkPkwZdeZj5APw9q6u6m6QKt/0X7mUAAI9wgsxL 0tYPIWd5tqSssR5ldPfDg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddufeeltdefucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepvfevkfgjfhfhufffsedttdertddttddtnecuhfhrohhmpefhihhnnhcuvfhhrghi nhcuoehfthhhrghinheslhhinhhugidqmheikehkrdhorhhgqeenucggtffrrghtthgvrh hnpeehkeduffehjedvieevkeelleegffeiuddvgeeluefhuedugeekkeehffekgffgheen ucffohhmrghinhepkhgvrhhnvghlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepfhhthhgrihhnsehlihhnuhigqdhmieekkhdrohhr ghdpnhgspghrtghpthhtohepuddtpdhmohguvgepshhmthhpohhuthdprhgtphhtthhope hpvghtvghriiesihhnfhhrrgguvggrugdrohhrghdprhgtphhtthhopeifihhllheskhgv rhhnvghlrdhorhhgpdhrtghpthhtoheprghkphhmsehlihhnuhigqdhfohhunhgurghtih honhdrohhrghdprhgtphhtthhopegrrhhnugesrghrnhgusgdruggvpdhrtghpthhtohep sghoqhhunhdrfhgvnhhgsehgmhgrihhlrdgtohhmpdhrtghpthhtohepghgvvghrtheslh hinhhugidqmheikehkrdhorhhgpdhrtghpthhtoheplhhinhhugidqrghrtghhsehvghgv rhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvgh gvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqmheikehksehvghgv rhdrkhgvrhhnvghlrdhorhhg X-ME-Proxy: Feedback-ID: i58a146ae:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 20 Oct 2025 18:36:25 -0400 (EDT) To: Peter Zijlstra , Will Deacon Cc: Andrew Morton , Arnd Bergmann , Boqun Feng , Geert Uytterhoeven , linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-m68k@vger.kernel.org, Mark Rutland Message-ID: <93055d50d71662261fbcc04488536e7330975954.1760999284.git.fthain@linux-m68k.org> In-Reply-To: References: From: Finn Thain Subject: [RFC v4 3/5] atomic: Specify alignment for atomic_t and atomic64_t Date: Tue, 21 Oct 2025 09:28:04 +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" Some recent commits incorrectly assumed 4-byte alignment of locks. That assumption fails on Linux/m68k (and, interestingly, would have failed on Linux/cris also). Specify the minimum alignment of atomic variables for fewer surprises and (hopefully) better performance. On an m68k system with 14 MB of RAM, this patch reduces the available memory by a couple of percent. On a 64 MB system, the cost is under 1% but still significant. I don't know whether there is sufficient performance gain to justify the memory cost; it still has to be measured. Link: https://lore.kernel.org/lkml/CAMuHMdW7Ab13DdGs2acMQcix5ObJK0O2dG_Fxzr= 8_g58Rc1_0g@mail.gmail.com/ --- Changed since v2: - Specify natural alignment for atomic64_t. Changed since v1: - atomic64_t now gets an __aligned attribute too. - The 'Fixes' tag has been dropped because Lance sent a different fix for commit e711faaafbe5 ("hung_task: replace blocker_mutex with encoded blocker") that's suitable for -stable. --- include/asm-generic/atomic64.h | 2 +- include/linux/types.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/asm-generic/atomic64.h b/include/asm-generic/atomic64.h index 100d24b02e52..f22ccfc0df98 100644 --- a/include/asm-generic/atomic64.h +++ b/include/asm-generic/atomic64.h @@ -10,7 +10,7 @@ #include =20 typedef struct { - s64 counter; + s64 __aligned(sizeof(s64)) counter; } atomic64_t; =20 #define ATOMIC64_INIT(i) { (i) } diff --git a/include/linux/types.h b/include/linux/types.h index 6dfdb8e8e4c3..a225a518c2c3 100644 --- a/include/linux/types.h +++ b/include/linux/types.h @@ -179,7 +179,7 @@ typedef phys_addr_t resource_size_t; typedef unsigned long irq_hw_number_t; =20 typedef struct { - int counter; + int __aligned(sizeof(int)) counter; } atomic_t; =20 #define ATOMIC_INIT(i) { (i) } --=20 2.49.1 From nobody Sat Feb 7 21:53:05 2026 Received: from fout-b6-smtp.messagingengine.com (fout-b6-smtp.messagingengine.com [202.12.124.149]) (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 EB5692F39A4; Mon, 20 Oct 2025 22:36:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.149 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760999804; cv=none; b=uLk0hVINuXXPmZcdyWhZC6peQSFJrAjj1g0bmXJLa0LfJigW5tVxc4LjoayXUOBJCXmUwlfFnbi6CeB4HRaE2L4yTSBTUTaJ9cgEjZU2ieLd9dFRaV7L1Y8MpjDlxDEMwFqhlQ6wYMIMsEnvNB0h8EojPBSDeZZiiqaYFKrhB9Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760999804; c=relaxed/simple; bh=yybUSf5T3g/3w85klnU1zuJcnxM9ZRoEL4oq6VF0u5w=; h=To:Cc:Message-ID:In-Reply-To:References:From:Subject:Date; b=IsbBhHGG7py5xJgaF5IIQ1/1RE1ZKKbUhk4istm8HPZfNOEgXpfznBJhw/n6y3drN3qjZy9Dt/gKarDnl+n3eiGWMQ2f8gK+vyRkFIpB+t2TN+Z5UbDgOI600S/Lfg6dPorut6GFN4GGm/Zdh2UYWM9PsZMOBYNrTGwCCeLZ2XA= 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=eWr514gx; arc=none smtp.client-ip=202.12.124.149 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="eWr514gx" Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfout.stl.internal (Postfix) with ESMTP id D532A1D0013B; Mon, 20 Oct 2025 18:36:41 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-05.internal (MEProxy); Mon, 20 Oct 2025 18:36:42 -0400 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=1760999801; x= 1761086201; bh=Of30O2Rz6y1OZ0rGOWsuDyxzWM+1+/UyDo323/R5FGA=; b=e Wr514gxs7XHhxnXDx33HM79f8FpGzy11zZr8o58/ddhcZi+bIsKL17ERx0z6W+Ok XSAC854j1ld8xfWEQlbJvu0/FTifGVo9hOKlT3D/zBSe4/6g8qJRMoL9c/7aWpau Miv+EtNzVoDRJ+4j4W2mkDtDpZCoWSyMdhhOZm7fQR/hqql+NVYtFp9wYKksH8oJ 7hWjqZHAgNwbsEIJafBxX5J1fMQaD1i4GrYg5Rq0zcv33JcyIqYDhrW7TGekycx+ YHlheC3Qm1p4cKcH98AoEqgw0pYpj5el+7HJnamR4uLI4Xfw1yviOVicXn6ZUWPZ ZOsy8wm/9YMA/1epwMB3g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddufeeltdegucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepvfevkfgjfhfhufffsedttdertddttddtnecuhfhrohhmpefhihhnnhcuvfhhrghi nhcuoehfthhhrghinheslhhinhhugidqmheikehkrdhorhhgqeenucggtffrrghtthgvrh hnpeehkeduffehjedvieevkeelleegffeiuddvgeeluefhuedugeekkeehffekgffgheen ucffohhmrghinhepkhgvrhhnvghlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepfhhthhgrihhnsehlihhnuhigqdhmieekkhdrohhr ghdpnhgspghrtghpthhtohepuddtpdhmohguvgepshhmthhpohhuthdprhgtphhtthhope hpvghtvghriiesihhnfhhrrgguvggrugdrohhrghdprhgtphhtthhopeifihhllheskhgv rhhnvghlrdhorhhgpdhrtghpthhtoheprghkphhmsehlihhnuhigqdhfohhunhgurghtih honhdrohhrghdprhgtphhtthhopegrrhhnugesrghrnhgusgdruggvpdhrtghpthhtohep sghoqhhunhdrfhgvnhhgsehgmhgrihhlrdgtohhmpdhrtghpthhtohepghgvvghrtheslh hinhhugidqmheikehkrdhorhhgpdhrtghpthhtoheplhhinhhugidqrghrtghhsehvghgv rhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvgh gvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqmheikehksehvghgv rhdrkhgvrhhnvghlrdhorhhg X-ME-Proxy: Feedback-ID: i58a146ae:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 20 Oct 2025 18:36:38 -0400 (EDT) To: Peter Zijlstra , Will Deacon Cc: Andrew Morton , Arnd Bergmann , Boqun Feng , Geert Uytterhoeven , linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-m68k@vger.kernel.org, Mark Rutland Message-ID: <7943c7f0196171c918df671c68003e62b69c8509.1760999284.git.fthain@linux-m68k.org> In-Reply-To: References: From: Finn Thain Subject: [RFC v4 4/5] atomic: Add alignment check to instrumented atomic operations Date: Tue, 21 Oct 2025 09:28:04 +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" From: Peter Zijlstra Add a Kconfig option for debug builds which logs a warning when an instrumented atomic operation takes place that's misaligned. Some platforms don't trap for this. Link: https://lore.kernel.org/lkml/20250901093600.GF4067720@noisy.programmi= ng.kicks-ass.net/ --- Changed since v2: - Always check for natural alignment. --- To make this useful on those architectures that don't naturally align scalars (x86-32, m68k and sh come to mind), please also use "[PATCH] atomic: skip alignment check for try_cmpxchg() old arg" https://lore.kernel.org/all/20251006110740.468309-1-arnd@kernel.org/ --- include/linux/instrumented.h | 4 ++++ lib/Kconfig.debug | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/include/linux/instrumented.h b/include/linux/instrumented.h index 711a1f0d1a73..402a999a0d6b 100644 --- a/include/linux/instrumented.h +++ b/include/linux/instrumented.h @@ -7,6 +7,7 @@ #ifndef _LINUX_INSTRUMENTED_H #define _LINUX_INSTRUMENTED_H =20 +#include #include #include #include @@ -67,6 +68,7 @@ static __always_inline void instrument_atomic_read(const = volatile void *v, size_ { kasan_check_read(v, size); kcsan_check_atomic_read(v, size); + WARN_ON_ONCE(IS_ENABLED(CONFIG_DEBUG_ATOMIC) && ((unsigned long)v & (size= - 1))); } =20 /** @@ -81,6 +83,7 @@ static __always_inline void instrument_atomic_write(const= volatile void *v, size { kasan_check_write(v, size); kcsan_check_atomic_write(v, size); + WARN_ON_ONCE(IS_ENABLED(CONFIG_DEBUG_ATOMIC) && ((unsigned long)v & (size= - 1))); } =20 /** @@ -95,6 +98,7 @@ static __always_inline void instrument_atomic_read_write(= const volatile void *v, { kasan_check_write(v, size); kcsan_check_atomic_read_write(v, size); + WARN_ON_ONCE(IS_ENABLED(CONFIG_DEBUG_ATOMIC) && ((unsigned long)v & (size= - 1))); } =20 /** diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index dc0e0c6ed075..1c7e30cdfe04 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -1363,6 +1363,16 @@ config DEBUG_PREEMPT depending on workload as it triggers debugging routines for each this_cpu operation. It should only be used for debugging purposes. =20 +config DEBUG_ATOMIC + bool "Debug atomic variables" + depends on DEBUG_KERNEL + help + If you say Y here then the kernel will add a runtime alignment check + to atomic accesses. Useful for architectures that do not have trap on + mis-aligned access. + + This option has potentially significant overhead. + menu "Lock Debugging (spinlocks, mutexes, etc...)" =20 config LOCK_DEBUGGING_SUPPORT --=20 2.49.1 From nobody Sat Feb 7 21:53:05 2026 Received: from fout-b6-smtp.messagingengine.com (fout-b6-smtp.messagingengine.com [202.12.124.149]) (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 3796D2F0C46; Mon, 20 Oct 2025 22:36:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.149 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760999815; cv=none; b=RSRlSu50PYT0mKYSKnS19pyYbnypbdoxKouqNMH8+dRYGSWdonIZGLxjpthivwp+BQtiLEvVBdUWGXk9FeS6PvvNlK9hOtQtTDzN80JmbN9LolRzdPefNRy88L5ATlsv2VGZvOfW77hxM5/6i+96gw2hvzmJEmnoE2s/a1WNDAs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760999815; c=relaxed/simple; bh=oAwsmojtKX1hlDXyiaKqg3VsPIxLw2dunAdcVhMc1Mo=; h=To:Cc:Message-ID:In-Reply-To:References:From:Subject:Date; b=CdL23ckbIpBH6eC5x6Oqi34CEqNx0zoi2Qh5yBkK+WaWf0C6InGbC065cZGDZTnw12WyNCgBVSKPbde2umkUwCMoTXQQu/AYxgYCIvNOj3lFJI4PyyrwBryLYU0skEeTn+vUE0Ovu5W9a2WqJqMHP3Lg3eBjTrrPxB3k4IME8J8= 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=vZySVlpO; arc=none smtp.client-ip=202.12.124.149 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="vZySVlpO" Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfout.stl.internal (Postfix) with ESMTP id 036191D00149; Mon, 20 Oct 2025 18:36:52 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-06.internal (MEProxy); Mon, 20 Oct 2025 18:36:53 -0400 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=1760999812; x= 1761086212; bh=xCzEtoNxSS71DBOWSJCr+vKOLnsVoIb0CZZ05NZm2s0=; b=v ZySVlpOqjUr2UiuoNNKy0hKoVzCr47R5TPjuxzyezI0RG8okQ4l/K77vPWkRV9kX VynGCYcR03rg9O4qc780NESiW7XQ81+hv1Y9lMhpRUieOxoBcTuKH4OOjTSGqYcb OmnKyatZhwSXtl21/uIYgRFplnonxhigIfJoHBNLTL3x/PJIBievYtPQx9dPY0ni pOMu4pbut+jgVSTg4TmlaW4KlOrXYz3ZEXwQeK8aZaRuGzUBApSEeGfzTW6SsJmh eh0R5P+cPeKMMcLEdgG3fHpd73fOAkkAS9Akn7yS+R+kNrBzIxQYdaaY7DlyD9VA cbKk1wAoEGYu6WQEPcQqg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddufeeltdefucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepvfevkfgjfhfhufffsedttdertddttddtnecuhfhrohhmpefhihhnnhcuvfhhrghi nhcuoehfthhhrghinheslhhinhhugidqmheikehkrdhorhhgqeenucggtffrrghtthgvrh hnpeevgffgtdfhhfefveeuudfgtdeugfeftedtveekieeggfduleetgeegueehgeffffen ucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehfthhhrg hinheslhhinhhugidqmheikehkrdhorhhgpdhnsggprhgtphhtthhopedutddpmhhouggv pehsmhhtphhouhhtpdhrtghpthhtohepphgvthgvrhiisehinhhfrhgruggvrggurdhorh hgpdhrtghpthhtohepfihilhhlsehkvghrnhgvlhdrohhrghdprhgtphhtthhopegrkhhp mheslhhinhhugidqfhhouhhnuggrthhiohhnrdhorhhgpdhrtghpthhtoheprghrnhguse grrhhnuggsrdguvgdprhgtphhtthhopegsohhquhhnrdhfvghnghesghhmrghilhdrtgho mhdprhgtphhtthhopehgvggvrhhtsehlihhnuhigqdhmieekkhdrohhrghdprhgtphhtth hopehlihhnuhigqdgrrhgthhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthho pehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtth hopehlihhnuhigqdhmieekkhesvhhgvghrrdhkvghrnhgvlhdrohhrgh X-ME-Proxy: Feedback-ID: i58a146ae:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 20 Oct 2025 18:36:50 -0400 (EDT) To: Peter Zijlstra , Will Deacon Cc: Andrew Morton , Arnd Bergmann , Boqun Feng , Geert Uytterhoeven , linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-m68k@vger.kernel.org, Mark Rutland Message-ID: <98018681b75da61108b992ab15ad455569863924.1760999284.git.fthain@linux-m68k.org> In-Reply-To: References: From: Finn Thain Subject: [RFC v4 5/5] atomic: Add option for weaker alignment check Date: Tue, 21 Oct 2025 09:28:04 +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" Add a new Kconfig symbol to make CONFIG_DEBUG_ATOMIC more useful on those architectures which do not align dynamic allocations to 8-byte boundaries. Without this, CONFIG_DEBUG_ATOMIC produces excessive WARN splats. --- Changed since v3: - Dropped #include to avoid a build failure on arm64. - Rewrote Kconfig help text to better describe preferred alignment. - Refactored to avoid line-wrapping and duplication. --- include/linux/instrumented.h | 17 ++++++++++++++--- lib/Kconfig.debug | 8 ++++++++ 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/include/linux/instrumented.h b/include/linux/instrumented.h index 402a999a0d6b..ca946c5860be 100644 --- a/include/linux/instrumented.h +++ b/include/linux/instrumented.h @@ -56,6 +56,17 @@ static __always_inline void instrument_read_write(const = volatile void *v, size_t kcsan_check_read_write(v, size); } =20 +static __always_inline void instrument_atomic_check_alignment(const volati= le void *v, size_t size) +{ + if (IS_ENABLED(CONFIG_DEBUG_ATOMIC)) { + unsigned int mask =3D size - 1; + + if (IS_ENABLED(CONFIG_DEBUG_ATOMIC_LARGEST_ALIGN)) + mask &=3D sizeof(struct { long x; } __aligned_largest) - 1; + WARN_ON_ONCE((unsigned long)v & mask); + } +} + /** * instrument_atomic_read - instrument atomic read access * @v: address of access @@ -68,7 +79,7 @@ static __always_inline void instrument_atomic_read(const = volatile void *v, size_ { kasan_check_read(v, size); kcsan_check_atomic_read(v, size); - WARN_ON_ONCE(IS_ENABLED(CONFIG_DEBUG_ATOMIC) && ((unsigned long)v & (size= - 1))); + instrument_atomic_check_alignment(v, size); } =20 /** @@ -83,7 +94,7 @@ static __always_inline void instrument_atomic_write(const= volatile void *v, size { kasan_check_write(v, size); kcsan_check_atomic_write(v, size); - WARN_ON_ONCE(IS_ENABLED(CONFIG_DEBUG_ATOMIC) && ((unsigned long)v & (size= - 1))); + instrument_atomic_check_alignment(v, size); } =20 /** @@ -98,7 +109,7 @@ static __always_inline void instrument_atomic_read_write= (const volatile void *v, { kasan_check_write(v, size); kcsan_check_atomic_read_write(v, size); - WARN_ON_ONCE(IS_ENABLED(CONFIG_DEBUG_ATOMIC) && ((unsigned long)v & (size= - 1))); + instrument_atomic_check_alignment(v, size); } =20 /** diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 1c7e30cdfe04..4d3ebe501d17 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -1373,6 +1373,14 @@ config DEBUG_ATOMIC =20 This option has potentially significant overhead. =20 +config DEBUG_ATOMIC_LARGEST_ALIGN + bool "Check alignment only up to __aligned_largest" + depends on DEBUG_ATOMIC + help + If you say Y here then the check for natural alignment of + atomic accesses will be constrained to the compiler's largest + alignment for scalar types. + menu "Lock Debugging (spinlocks, mutexes, etc...)" =20 config LOCK_DEBUGGING_SUPPORT --=20 2.49.1