From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from flow-b5-smtp.messagingengine.com (flow-b5-smtp.messagingengine.com [202.12.124.140]) (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 CD4DB2343C0; Tue, 13 Jan 2026 05:37:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.140 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768282680; cv=none; b=au6FPa2818T7diEsa4FSYDbqvH99KhlEvuidKdwyDWWQCiMvgyElRrQ5z6wd1FfyX2uaiOOWCmiT+kqOJLOefMxg7UtQmmEb0bSiYATSk9sTqKZonNeUSt0/5KaMDcbudbnuBhJPjaHstwLEQAEH5IFLqHSqmmLW72bThTVj8Wc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768282680; c=relaxed/simple; bh=puNEXADyslbCDUE/v5uUZSgeX6mBadwDTQUGSLFJl80=; h=Message-ID:From:Subject:Date:To:Cc; b=R01mAg630skoJzIhstX1+y7KNQhgmM0y5c0K8HhXos6Pe2qKw8wu7gD27a8zFsP8F8vRCgAumwRc5gwtFIuoRU6RnFgnaxZUjtLpTeV199Hwm04/TXp9vu0yXk2d7uXfuUh68qtFliAi6MOJ0yjRkOeBItsab114z8/nmZAmpPo= 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=cVkF3omA; arc=none smtp.client-ip=202.12.124.140 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="cVkF3omA" Received: from phl-compute-12.internal (phl-compute-12.internal [10.202.2.52]) by mailflow.stl.internal (Postfix) with ESMTP id BE8EF1300343; Tue, 13 Jan 2026 00:37:56 -0500 (EST) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-12.internal (MEProxy); Tue, 13 Jan 2026 00:37:57 -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:message-id:reply-to:subject :subject:to:to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1768282676; x=1768289876; bh=SIZTTLX4L6b0H0FhsrLfjIbPTzJy CXQADM2Gtk5KlLg=; b=cVkF3omA6kRd1qDwlC/QjBcG/sNoji8l1VMwZh5ITsAj IQH6XZmZbiJVGHRbZNI1spqePSMKyrqoDMwwPKT9X9TMQdtXMcjAsyEdPy0ukA+L ZDMfLblW0EcIBWBADvSLA/TyX2BJ76a1kqJzcx0V7tJNb+YJgWt26WyVbIZNDovh +KfxQIQ8/tQiKcSqZ7RT5cyIeTi3y45MAu/acBvX6U89CV4q8v+CTVDg9HJQiU7y GsWTn9e7YKSKZdta713rl4jdQ6gbpZqw0svYrmk0r8Kv7cn5uW0qkBsKgYOlexTe z/U9BUOXaf/dlsiRUJjnncK0nDS/gBUsTG2khjBzTQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdduudelgeelucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepkffhufffvfevsedttdertddttddtnecuhfhrohhmpefhihhnnhcuvfhhrghinhcu oehfthhhrghinheslhhinhhugidqmheikehkrdhorhhgqeenucggtffrrghtthgvrhhnpe duvedtieevfedvffetudehteeihedtkefhkeeivdelvddtheekteeiueduudefueenucff ohhmrghinhepudejrddqnhgvfienucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpehfthhhrghinheslhhinhhugidqmheikehkrdhorhhgpdhnsggp rhgtphhtthhopeegvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheprghkphhmse hlihhnuhigqdhfohhunhgurghtihhonhdrohhrghdprhgtphhtthhopehpvghtvghriies ihhnfhhrrgguvggrugdrohhrghdprhgtphhtthhopeifihhllheskhgvrhhnvghlrdhorh hgpdhrtghpthhtoheprghnughrihhisehkvghrnhgvlhdrohhrghdprhgtphhtthhopegr rhgusgeskhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprghrnhgusegrrhhnuggsrdguvg dprhgtphhtthhopegrshhtsehkvghrnhgvlhdrohhrghdprhgtphhtthhopegsohhquhhn rdhfvghnghesghhmrghilhdrtghomhdprhgtphhtthhopegsphesrghlihgvnhekrdguvg X-ME-Proxy: Feedback-ID: i58a146ae:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 13 Jan 2026 00:37:46 -0500 (EST) Message-ID: From: Finn Thain Subject: [PATCH v7 0/4] Align atomic storage Date: Tue, 13 Jan 2026 16:22:28 +1100 To: Andrew Morton , Peter Zijlstra , Will Deacon Cc: Andrii Nakryiko , Ard Biesheuvel , Arnd Bergmann , Alexei Starovoitov , Boqun Feng , Borislav Petkov , bpf@vger.kernel.org, Rich Felker , Daniel Borkmann , Dave Hansen , Dinh Nguyen , Eduard Zingerman , Gary Guo , Geert Uytterhoeven , John Paul Adrian Glaubitz , Guo Ren , Hao Luo , "H. Peter Anvin" , John Fastabend , Jiri Olsa , Jonas Bonn , KP Singh , linux-arch@vger.kernel.org, linux-csky@vger.kernel.org, linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-openrisc@vger.kernel.org, linux-sh@vger.kernel.org, Mark Rutland , Martin KaFai Lau , Ingo Molnar , Sasha Levin , Stanislav Fomichev , Stafford Horne , Song Liu , Stefan Kristiansson , Thomas Gleixner , Yonghong Song , Yoshinori Sato Precedence: bulk X-Mailing-List: linux-arch@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: This series adds the __aligned attribute to atomic_t and atomic64_t definitions in include/linux and include/asm-generic (respectively) to get natural alignment of both types on csky, m68k, microblaze, nios2, openrisc and sh. This series also adds Kconfig options to enable a new run-time warning to help reveal misaligned atomic accesses on platforms which don't trap that. The performance impact is expected to vary across platforms and workloads. The measurements I made on m68k show that some workloads run faster and others slower. --- Changed since v6 - Test for __DISABLE_EXPORTS macro instead of __DISABLE_BUG_TABLE macro. Changed since v5: - Added acked-by and revewed-by tags. - Added a new macro to inhibit emission of __bug_table section, for the benefit of pre-boot code like the EFI stub loader. Changed since v4: - Dropped parisc header file patch as it's been merged already. - Submitted as PATCH instead of RFC. Changed since v3: - Rebased on v6.17. - New patch to resolve header dependency issue on parisc. - Dropped documentation patch. Changed since v2: - Specify natural alignment for atomic64_t. - CONFIG_DEBUG_ATOMIC checks for natural alignment again. - New patch to add weakened alignment check. - New patch for explicit alignment in BPF header. --- Finn Thain (3): bpf: Explicitly align bpf_res_spin_lock atomic: Specify alignment for atomic_t and atomic64_t atomic: Add option for weaker alignment check Peter Zijlstra (1): atomic: Add alignment check to instrumented atomic operations include/asm-generic/atomic64.h | 2 +- include/asm-generic/rqspinlock.h | 2 +- include/linux/instrumented.h | 17 +++++++++++++++++ include/linux/types.h | 2 +- kernel/bpf/rqspinlock.c | 1 - lib/Kconfig.debug | 18 ++++++++++++++++++ 6 files changed, 38 insertions(+), 4 deletions(-) -- 2.49.1