From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (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 CD7D2483BD6; Tue, 15 Sep 2026 10:58:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789469927; cv=none; b=lfn9baIk0+RZffN//J0rGia85dwXU9XW73wdlh+qip+0vCubiH/m6EwOd8EGJzigRQG2YeocqA9rSTO0/W1eW80ouY/vKj4ReMoY8FGSsdgQ5GbE1X8/9x+skp/Xt0TN4obhvmXhbW4TMfEphgtIRQzO7POl8v0q1cWWRbHPHlk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789469927; c=relaxed/simple; bh=dY0q2inShOf1iFynSL7QntpUqtr/LiL5XlMbuV1S8Mo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=TU9h2+tk+i8kdkuuSev/JN94gxpEcL+q3iI3Z2E1RUnNm0JwL1hUzYLKvIFDxWFLer2Rf9fQ0kTkpQvqZ8ooo2hcmQ7Zm+eEXJVC6T5bTfIhpt47UbkuA9zIP547RhjtfZ5tGLZXryVqreP44hTIGmFjlJm7r0qE3Ta0FITiVFk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=WxtgckeJ; arc=none smtp.client-ip=148.251.105.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="WxtgckeJ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1789469923; bh=dY0q2inShOf1iFynSL7QntpUqtr/LiL5XlMbuV1S8Mo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=WxtgckeJhvCgXFGvJfSYT3jGdEnLSYaMoIrkJ5L2WBeZlBA+c+eAVMcbSxWNdB6MJ sbdKcx6bBOAuPLzaux0qSbUsPwJ1ILU68WcqLbk+IdTZ50oI30JNMQh+3vybSFp1Oe tMLs/OjPhfMg4FABc2v4xs2ta8MzN54obg6Ly9dvLvruEtgSkazWNmeNP7b8MAucBj gN0EFCdncviE0OKTdNGXUD4EATyJLt8UK5s4KXF01zEoeF/hmWMITezoqpgi3ozNWD Ep3EGhq/Db+iaTdK3LZ9XL0vVA4lt/J8WLP1wWa5bIu1DuovxNzWllhqcBEBOnD6AP nc4mC376zLbRg== Received: from laura.lan (unknown [100.64.0.215]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: laura.nao) by bali.collaboradmins.com (Postfix) with ESMTPSA id E5B0917E09B5; Tue, 15 Sep 2026 12:58:42 +0200 (CEST) From: Laura Nao Date: Tue, 15 Sep 2026 12:57:35 +0200 Subject: [PATCH 2/9] rust: io: drop the CONFIG_64BIT restriction on system memory u64 access Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260915-tyr-interfaces-v1-2-5d28f1f75aca@collabora.com> References: <20260915-tyr-interfaces-v1-0-5d28f1f75aca@collabora.com> In-Reply-To: <20260915-tyr-interfaces-v1-0-5d28f1f75aca@collabora.com> To: Danilo Krummrich , Alice Ryhl , Daniel Almeida , David Airlie , Simona Vetter , Miguel Ojeda , Boqun Feng , Gary Guo , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Trevor Gross , Tamir Duberstein , Alexandre Courbot , =?utf-8?q?Onur_=C3=96zkan?= , FUJITA Tomonori , Frederic Weisbecker , Lyude Paul , Thomas Gleixner , Anna-Maria Behnsen , John Stultz , Stephen Boyd Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, driver-core@lists.linux.dev, rust-for-linux@vger.kernel.org, kernel@collabora.com, Laura Nao X-Mailer: b4 0.14.3 SysMemBackend's IoCapable impl is currently gated on CONFIG_64BIT, copying the MMIO backend's restriction. MMIO needs that gate because readq() is not available on 32bit. System memory has no such dependency: a u64 volatile load/store compiles on any architecture, it's just not single-copy atomic on 32bit. Drop the gate so u64-backed types, such as bitfields, work on 32bit too. Document the non-atomicity at the impl instead of enforcing it at build time. Co-developed-by: Daniel Almeida Signed-off-by: Daniel Almeida Signed-off-by: Laura Nao --- rust/kernel/io.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rust/kernel/io.rs b/rust/kernel/io.rs index de8ef8e2aec4..a85ddd07cb7f 100644 --- a/rust/kernel/io.rs +++ b/rust/kernel/io.rs @@ -1428,7 +1428,9 @@ fn io_write(view: SysMem<'_, $ty>, value: $ty) { impl_sysmem_io_capable!(u8); impl_sysmem_io_capable!(u16); impl_sysmem_io_capable!(u32); -#[cfg(CONFIG_64BIT)] +// Unlike MMIO, that needs `readq` which is not available on 32-bit, a +// system-memory `u64` access compiles on any target. It is just not +// single-copy atomic on 32-bit. impl_sysmem_io_capable!(u64); impl IoCopyable for SysMemBackend { -- 2.39.5