From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B06ABC43458 for ; Mon, 6 Jul 2026 12:59:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1604610E980; Mon, 6 Jul 2026 12:59:41 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="X2+m4bLB"; dkim-atps=neutral Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0230A10E993 for ; Mon, 6 Jul 2026 12:59:40 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id DFDFE43A12; Mon, 6 Jul 2026 12:59:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 76BBD1F000E9; Mon, 6 Jul 2026 12:59:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1783342779; bh=FlJPmYkcI/ixq7+2GtoHrDXypZbwDiQSCuksrbF+WSk=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=X2+m4bLB5zMlCEnuFdfTfIMXCjCh+UmqETyRLpuFEXAc+5mvLeplnMMLn+1gbqRiY UnEIU304kg7hAi1q2uOj4EkrR7ZBInrWRiDRLhFlyM0MJ5uumJjpWuH2Me+ESKmAKY orC2bu6kgLcEi0fP5z4TnZODOFw/spAHAy5DE2HpscY1AKXZoO1TIyHa0eSCMzxJ8C 7fLChu19r6QgWIaTXXIYhAsEZYcCIPTv0zxTHmx1bgWXuiZ2b7H0d/3FEyamBh30Iy z9k9Lthd23tSVWkBPZomXixFCL9auV793vWPcyp9Ea+019JH2eKWWK1bnqX7CHzRb2 B40HUlINcHu3A== From: sashiko-bot@kernel.org Subject: Re: [PATCH v6 16/20] rust: io: add `read_val` and `write_val` functions on `Io` To: "Gary Guo" Cc: "Danilo Krummrich" , dri-devel@lists.freedesktop.org, linux-pci@vger.kernel.org, "Alexandre Courbot" , ojeda@kernel.org In-Reply-To: <20260706-io_projection-v6-16-72cd5d055d54@garyguo.net> References: <20260706-io_projection-v6-0-72cd5d055d54@garyguo.net> <20260706-io_projection-v6-16-72cd5d055d54@garyguo.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Mon, 06 Jul 2026 12:59:38 +0000 Message-Id: <20260706125939.76BBD1F000E9@smtp.kernel.org> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sashiko-reviews@lists.linux.dev Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" > Provide `read_val` and `write_val` that allow I/O views to be accessed wh= en > they're narrowed down to just views of primitives. >=20 > This is used to provide `io_read!` and `io_write!` macros, which are > generalized version of current `dma_read!` and `dma_write!` macro that wo= rk > for all types that implement `Io`. >=20 > Note though `io_read!` and `io_write!` only works if backend implements > `IoCapable` for the type; which is typically only implemented for > atomically accessible primitives. `dma_read!` and `dma_write!` currently > supports them via `read_volatile` and `write_volatile`; this can be > undesirable for aggregates as LLVM may turn them to multiple instructions > to access parts and re-assemble, even if they could be combined to a sing= le > instruction. Thus, `io_read!()` and `io_write!()` does not fully replace > `dma_read!()` and `dma_write!()` in this scenario. The ability to > read/write aggregates (when atomicity is of no concern) is better served > with copying primitives (e.g. memcpy_{from,to}io). >=20 > Reviewed-by: Alexandre Courbot > Signed-off-by: Gary Guo Sashiko has reviewed this patch and found no issues. It looks great! --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20260706-io_project= ion-v6-0-72cd5d055d54@garyguo.net?part=3D16