From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f74.google.com (mail-ed1-f74.google.com [209.85.208.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E4ED242669F for ; Tue, 20 Jan 2026 12:38:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.74 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768912701; cv=none; b=pd1nQXSkeV+rbIKNvfJPmdcpahUmwR2dkV75ECDSTbJAoKTesbPw7KFpZisE3W8fSyAS8/OIDtGiNJBe9/APvwEYi3j7XxUjlb/c4D4MzOtYWJ+5YnAucH6P9dsQBXUOSLZ1WsoQaCSxGI/edFNKtz45wyYTr+z192SI9BD3k9k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768912701; c=relaxed/simple; bh=TXFVFSzZ/jVdUgcfun/l6Z+4x2xn58VmCP/XffLA3eo=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=jBIGK31vBfJJ0hTiH8W5HXYArZMTTtboV0zy7p4CaHfhq1rlCeQaqk077LOLIsY/5adSnw2VNqlhtNFPLDio8opRJaE04V7xcHIPl9TIE8H+GL7mcWyMKxHudXWrxp4wr1tpPloDKjB6YNaMCDjR9uQvT/0010tSUoc6r2YoShM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=aGoD4RTU; arc=none smtp.client-ip=209.85.208.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="aGoD4RTU" Received: by mail-ed1-f74.google.com with SMTP id 4fb4d7f45d1cf-6580e793380so148651a12.3 for ; Tue, 20 Jan 2026 04:38:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1768912698; x=1769517498; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=kRu3uxT5l6ryH7K1x56GRVdKqVKTOQ0aBzImZoC0pQU=; b=aGoD4RTU+L6HsoAjns/mR9MWP+FQL8S/Whr5WksEviwbQBAa5TkcGZZHS4NcGbkqr6 lQ3LAomAcLGsFfxVgjmMb/Sz+JmY1XFQIPNm2Wq9AvUTCveqyfUCBwz41l0bAOv92ekk 9ZRBFjC0d6Sva8hLWWgmA2FW37PMQPdebfaHSrTJ8uwqM1FMVRrGbM/2vzw+Waxxcj9s sKGm0P6sSDz35WXRAhNnZtCsXdEsJuh7nnzY64UUyGludCt0ncq78kQV+2VmEzuMdVA0 fGLcClZqZhbo+v8YfyF/dMp08qO8dkHIxjv2yVdkTFGkCXefZyL00p627piK5mAajwFk 2oFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768912698; x=1769517498; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=kRu3uxT5l6ryH7K1x56GRVdKqVKTOQ0aBzImZoC0pQU=; b=XgsveamWZM+4HBnrPD/7sSdl7kQMJ/gZlEORDrgco89Qt7Ccfr9l8EfW2JVxTTIlbT BigAsoIthfwEsIwrSGGhcrEJiJr7V1zb/sgKoTjsmLJ89jYz51ajQxoC/42aXerIKjt0 6h8b77e2EnPgPm/e4ZZC9ojbrN13lvuGNvqhTdd5b6ETthp0ey9l1RDdHkIjlXEgw8V4 SGIFmlT/Kdz0mQ1RrrlvKfzK8hw0C1E2HGuj80PGe+rUKQj9BE6MtK9blDdy895BFmr0 4jIskAwY6o1tna+syLHh6VRQar5QbKK3+6i57L1RDkhCGtsKY1vradkyesve9u+ZMkZJ Rw5g== X-Forwarded-Encrypted: i=1; AJvYcCUc2qG8c5Cloai/VKAMQ9WCQvaXokHEmz2RoGaegdLSWclMGgcsLMeAMPrtTlqQgfvBZRp+4yNgtf4OcM0=@vger.kernel.org X-Gm-Message-State: AOJu0Ywdsr4n2O8Ff+tsjU7gREi10qCSUQQIaBYu5ctt/Cq8jGg2rg61 byKbTNFu8joXhnaJhlYhL+1FbXyK8D38E5+IB+o1ZvFw5VGTi+2FsAtqzYIlR8hkvjRUKXT4glc XtE4GstXQ9WGl4J/N2g== X-Received: from wmbgx18.prod.google.com ([2002:a05:600c:8592:b0:477:5a4b:d57f]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:8b78:b0:47e:e8c2:905f with SMTP id 5b1f17b1804b1-4801e30a790mr205228475e9.8.1768912686463; Tue, 20 Jan 2026 04:38:06 -0800 (PST) Date: Tue, 20 Jan 2026 12:38:05 +0000 In-Reply-To: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260119202250.870588-1-zhiw@nvidia.com> <20260119202250.870588-3-zhiw@nvidia.com> Message-ID: Subject: Re: [PATCH v10 2/5] rust: io: separate generic I/O helpers from MMIO implementation From: Alice Ryhl To: Danilo Krummrich Cc: Zhi Wang , rust-for-linux@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, bhelgaas@google.com, kwilczynski@kernel.org, ojeda@kernel.org, alex.gaynor@gmail.com, boqun.feng@gmail.com, gary@garyguo.net, bjorn3_gh@protonmail.com, lossin@kernel.org, a.hindborg@kernel.org, tmgross@umich.edu, markus.probst@posteo.de, helgaas@kernel.org, cjia@nvidia.com, smitra@nvidia.com, ankita@nvidia.com, aniketa@nvidia.com, kwankhede@nvidia.com, targupta@nvidia.com, acourbot@nvidia.com, joelagnelf@nvidia.com, jhubbard@nvidia.com, zhiwang@kernel.org, daniel.almeida@collabora.com Content-Type: text/plain; charset="utf-8" On Tue, Jan 20, 2026 at 11:26:04AM +0000, Alice Ryhl wrote: > On Tue, Jan 20, 2026 at 11:12:18AM +0100, Danilo Krummrich wrote: > > On Tue Jan 20, 2026 at 9:04 AM CET, Alice Ryhl wrote: > > > On Mon, Jan 19, 2026 at 10:22:44PM +0200, Zhi Wang wrote: > > > Overall looks good to me. Some comments below: > > > > > > I still think it would make sense to have `IoCapable: IoTryCapable`, > > > but it's not a big deal. > > > > I think with this approach it's not necessary to have this requirement. In > > practice, most impls will have both, but I think it's a good thing that we don't > > have to have an impl even if not used by any driver, i.e. it helps avoiding dead > > code. > > > > >> + /// Infallible 64-bit read with compile-time bounds check. > > >> + #[cfg(CONFIG_64BIT)] > > >> + fn read64(&self, offset: usize) -> u64 > > >> + #[cfg(CONFIG_64BIT)] > > >> + fn try_read64(&self, offset: usize) -> Result > > > > > > These don't really need cfg(CONFIG_64BIT). You can place that cfg on > > > impl blocks of IoCapable. > > > > If you agree with the above, I can fix this up when applying the series. > > Ok with me. with cfg(CONFIG_64BIT) adjusted: Reviewed-by: Alice Ryhl