From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f73.google.com (mail-wm1-f73.google.com [209.85.128.73]) (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 294923EDABE for ; Tue, 20 Jan 2026 11:26:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768908368; cv=none; b=Vie4Q5j0pBWgXTVQXI2pSscUuNNjnDCdvOfIIwf4C5DVNSaFDW/AP2K7OUCklpnjpuIfGO4G8Ag+1mucWhLU59YT1SIk0+JvcWKcRJP/GzXS1c2iJ7y2wjfY+duCtEplpLFyNn/ThcvF+dNN75+8SOHwN05EntMGDZK60UHf50g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768908368; c=relaxed/simple; bh=aFwAsFCueI3F8HL61Jos3nEXhnNrwT2HXWoXx/DQ/Ts=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=GKg9amhjl1Kvpy1yUEUBw0sN7Sknfi6vIeEIfCBtywyzqm6FT24VsU66yTfObf/IrjVZgoTMwi5xAzdmMOjvL6DyaYTlNCYosIFlcBwitlzyPB+mOw//7NDev/fyzQz0/jz9IbEh5PY41nyJM3EY5gEhRpRSHClD/DRtl+Wetw8= 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=17MEL82D; arc=none smtp.client-ip=209.85.128.73 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="17MEL82D" Received: by mail-wm1-f73.google.com with SMTP id 5b1f17b1804b1-47d3ba3a49cso54556515e9.2 for ; Tue, 20 Jan 2026 03:26:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1768908365; x=1769513165; 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=ldsCAiEe6YHG+kFSXFuiVLJqCic1Hklucfx2DJT9jNA=; b=17MEL82Dk5v/pZzeQe7BB7anax2M1Ffrnn3wwWs8mIrPgZG7LMLQeUIxdRbkfe1yIY FmdqeToC1kK+/bI+fDoa1G0Dqg/qQM2nzM81Sr7fO9jQc2morOWV18ePw/fND8h5QIls Be+pDVxyGITP3xUGXQ2c8HSQDVmYnP9V4vXWyWR42QKZC5O2LcJHE9Zzfq7LyhwKcw/u ppc0HHMy5MBbOUIALLmZ8AZnqTXxRkizSFdIIWU7gzmcYXV0uiyDId9b2+1If4smEupK Tls7erAwLJ54hQn9xhPw+2oPYpRo+uFiTai2DqXzkRZQHmVRf2k81jogq4WYxdaMblD8 bRyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768908365; x=1769513165; 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=ldsCAiEe6YHG+kFSXFuiVLJqCic1Hklucfx2DJT9jNA=; b=KFFfQuvVDomQ4Ak/FU1cfiVt0AkN5rYnf1cJOunQbubAXCvMs3PDAb6W0ORTRBHdP9 Zctk734pYXtQ20nepkomWy+Iz37qhtdJUBoqOgne4ZY++IEY0VesfJOoj2zlEadiyCY0 BttSFe9pixdXx6KSKKDN3wI/melhqsZdGh6tOOFPxCgjttOAe4TDeQCWJzBhP1/WyERx 72lFrJDpHlgwSizyAPSii7KmGsKOVJV5OCwzm/mOjSj4zyWymW1TaR+YkEE23Tr97zAa 69rprfALnzm7Y8zOrGjn+nKM+1F1yLp/PYMNTQPGQxMwcNRfq69SalIl9LDmjPQSK2Ov W2bg== X-Forwarded-Encrypted: i=1; AJvYcCXq8d+WKc8PIZbv1qMDtaqxUU0WIqQi7269F1n+bNB6YaPEDivfqjhyXg0XzT8r6295SPjT8DrDMYhuQnU=@vger.kernel.org X-Gm-Message-State: AOJu0YwCCpPNLS2vx55PGOiGBFYiW/5kiO6biDkKlDhk1YOPZYA3Qrzn TnjbwUyArqzzs6GiS4L8eN0JNB7qI1C0kZo7t1uhY0WHXBHWCMXtAsWu3k07gtIg0/U0/dFZtm0 Su8v2R3FzaGE3BYSDTw== X-Received: from wmco8.prod.google.com ([2002:a05:600c:a308:b0:47e:e4f5:36ca]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:4e0f:b0:47e:e779:36e with SMTP id 5b1f17b1804b1-4801eb0375amr171782955e9.19.1768908365167; Tue, 20 Jan 2026 03:26:05 -0800 (PST) Date: Tue, 20 Jan 2026 11:26:04 +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: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. Alice