From nobody Fri Dec 19 15:59:32 2025 Received: from mail-wm1-f74.google.com (mail-wm1-f74.google.com [209.85.128.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 5744732721B for ; Thu, 6 Nov 2025 12:09:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762430956; cv=none; b=GHiKun3XprLonIbCZvzVzSspvRHfwkQHKzwQqaIG/vjNUJpsgeIfkHFNnsqkNpqrCuezwEf4tRBi8IOIlafIgwTgOp2CGSmrG76dVNzc7w8MbnoYBzlQh1HaSKHYM7DEAQU2W+JjTEJxYpoLD9yi5KGVSMfCczoa09UsX6BFJ1w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762430956; c=relaxed/simple; bh=PaKvBJJUvzklLSh/etTvpynoQWRBtbVS57WsNqJijtk=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=ewmPFIxr+PyxVpt99NynaLfNkTqK4uaPVfwXOIjPddiZC1yLKKBQs7FKUZW7XkAgyd0vpbQ6u6EMpdS9YpSlvY0gIQaRcow7CRE2bL5eAaZ8J8RFjZlmOy5M/0uctJ+pzbPTyhpJ2+q5DZpndDXVn0xQ2Rzxz/80HeaA246JfsQ= 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=WU13PWU9; arc=none smtp.client-ip=209.85.128.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="WU13PWU9" Received: by mail-wm1-f74.google.com with SMTP id 5b1f17b1804b1-477632c240bso5854895e9.2 for ; Thu, 06 Nov 2025 04:09:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1762430953; x=1763035753; 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=DYjh895sOQ0wZHG0qaTEVmBEXBySMzEq2h+tanPVig8=; b=WU13PWU9+bX5YixW9URgjETjLAmL+Reju/qqOykXq1OVj8ZM94Bmfi4e0ryE0kSOqp OP72mdvAzetjfmbTfC7ysj0ntAiZwxd6CB9NzbhBdQ98sAl0DyXBxv6fHlTraoBY/Umy N7fnX4zLmkGYyGD15FdXbQbh667qEyhmE72bmRNn9p7unjuJlf2h+/T+TMXx0GZGC6dX zlIyJfPrL+7ARnekPb5lZi+x3Cpu2wuxmCyYHLRmABogOvupx63/CLK+qXGwwL4Y24Cj wnr9gfbzSGqFv/dsnakMAI4l4bXrynpaLL4DqAlAV6aZPtnUfzlyEIGNZmm1zuXDXq1H ajtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762430953; x=1763035753; 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=DYjh895sOQ0wZHG0qaTEVmBEXBySMzEq2h+tanPVig8=; b=A9UBvejQRds5lT+BSCDym7OQ4Qcem6rDhKz3eMOZuyAXm8svF9pUCTHe8JnHBe8oS/ P398PJUmTBhNyaebJhZAtKznPQ06qUNyZX84N02Lf7jiuSTjW7yiG6HOILSJAPImhzQi NDW4gKj52XXtBBb6P515x6gfMiLWNimHZ0R5u+lbiQ4NTjRqP0KhkIg/uWU+TPRyUYZr 6fJO98yj+9nRfHcWVh2/wjfH5yCtSC6qi9ApAjvNvG6KmFsZY3hMLblnNenkrO9uy+22 qnabGoo8KGFlOQGI4dipCklE298CVgjKVMEYoCYWRJbIx+1nAd3sualDWXZHhc8XzJuC EvPw== X-Forwarded-Encrypted: i=1; AJvYcCXTCx87AqE8XzB2crzE4Sz69XrVpJJcLthc2MjQCfx/oNaKwl9OBCLvdFACxt5126ZJIvD95mS/TOpA9Jo=@vger.kernel.org X-Gm-Message-State: AOJu0Yz2g3DtKjA8/4rzANW0ainySvFUEXL6R4AIuEc2WB0EcEFyYIIo fiX5tUPDgGq4bBxOV1yRYgTgUG/tAstUQCufxG+0mztRJyI+/DoJbxftKZG5t3y+FDb0NClA+Sc 3cqB4/BWM31utGwwOug== X-Google-Smtp-Source: AGHT+IEamd18jj6uRBeSGyhGRNOi+lGXB8EXUCxbM6LPE4tOPIsbRl/P31hFj+mBgZAIWzQuRIUw83Q26LtQc4A= X-Received: from wmlc13.prod.google.com ([2002:a7b:c84d:0:b0:477:1449:b093]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:5297:b0:477:c71:1fc7 with SMTP id 5b1f17b1804b1-4775cdf61f3mr47082935e9.26.1762430952736; Thu, 06 Nov 2025 04:09:12 -0800 (PST) Date: Thu, 06 Nov 2025 12:08:59 +0000 In-Reply-To: <20251106-resource-phys-typedefs-v1-0-0c0edc7301ce@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251106-resource-phys-typedefs-v1-0-0c0edc7301ce@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=893; i=aliceryhl@google.com; h=from:subject:message-id; bh=PaKvBJJUvzklLSh/etTvpynoQWRBtbVS57WsNqJijtk=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpDI/mrOuyf/GH4VdeFehUKdKnNsLOKRAV1z6g2 lB5wL6TxCyJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaQyP5gAKCRAEWL7uWMY5 RqGID/0Y4Yjkqdz8dNxoJ4kFNhRTiO2nNUx/ssl6f+4yNpiKEg40UnTc62uOKvoVNEBWvAUadY+ dzmY9aDGkx92EEK7Rqy36jV1NAu4DO0a9NQ8bQVajyOH/QNwve08IO/zk974tTbbpa33qv+YKnh eDLSNXluSWpmK5/52cX52nzofvsGcDRiSwkVzjOF3f3Manl6ohinavzA6ZorX0j70kS0CRmu9NW tXGihJ8OR7w2dlTVUHiPJuD5c9AA6yE0Y0BX0/mc64iFs9Uz4e1f5iZJuk76pnSutZMkM1IRTuL IgrjdSCGhVbsjDYUI9cI/R9lyk+Ac7vNlwa2nDUW/r2fHRuYsdKwZr1llXytqBPJQmEwpQIJMxi BLQLntndt/DQK9ThK6Omomds5C7wncUmhEl+c0B6Qnv61bXai8pFIB1sSjqO7xaPciFF6GshJA3 e2pxomSwIqsf6R2kwLSQol2np8cdPkj7h2O6yhi1OmYsXdrt5u+eXK9KRUteprOgjouKr6EhX74 gNWAaZsuW/b3RhhB6JI1XEtM4ayW0MJ8+02DhM3QWqDq38nzCngA9rNkOtGh6Shbp+lK5M/PqF+ c1I4sur2LuKtM7NzHuacGagAo1xvxX6Nra1UzkwqjssjPeH8b9XMnEccGijVERTLBl6SwtKOPnd Xn0o4TrwvxHLyzg== X-Mailer: b4 0.14.2 Message-ID: <20251106-resource-phys-typedefs-v1-1-0c0edc7301ce@google.com> Subject: [PATCH 1/4] rust: io: define ResourceSize as resource_size_t From: Alice Ryhl To: Danilo Krummrich , Daniel Almeida Cc: Miguel Ojeda , Boqun Feng , Gary Guo , "=?utf-8?q?Bj=C3=B6rn_Roy_Baron?=" , Benno Lossin , Andreas Hindborg , Trevor Gross , Abdiel Janulgue , Robin Murphy , Greg Kroah-Hartman , "Rafael J. Wysocki" , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, Alice Ryhl Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable These typedefs are always equivalent so this should not change anything, but the code makes a lot more sense like this. Signed-off-by: Alice Ryhl --- rust/kernel/io/resource.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/kernel/io/resource.rs b/rust/kernel/io/resource.rs index bea3ee0ed87b51816e2afb5a8a36fedee60d0e06..11b6bb9678b4e36603cc26fa2d6= 552c0a7e8276c 100644 --- a/rust/kernel/io/resource.rs +++ b/rust/kernel/io/resource.rs @@ -16,7 +16,7 @@ /// /// This is a type alias to either `u32` or `u64` depending on the config = option /// `CONFIG_PHYS_ADDR_T_64BIT`, and it can be a u64 even on 32-bit archite= ctures. -pub type ResourceSize =3D bindings::phys_addr_t; +pub type ResourceSize =3D bindings::resource_size_t; =20 /// A region allocated from a parent [`Resource`]. /// --=20 2.51.2.1026.g39e6a42477-goog From nobody Fri Dec 19 15:59:32 2025 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 48C6C3128CB for ; Thu, 6 Nov 2025 12:09:15 +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=1762430957; cv=none; b=gHkpmWybO6ODr9wsCtzV+A+599c8mVAXHim+MUNV70dUmlQuBzYdJuy3tfofUiObWwBdLUy+61IVQYTVaMOz7SOL2dAbzxtciLULUwwl1NxGy/8SrY144fXuYah4Q3X8f071zuB7Ch+5sVWqvkY06TRVAqkWbpYKaymVDnR3miA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762430957; c=relaxed/simple; bh=EyMMNtp0mSRcwaDDRTyBRK9QbQwJ9nF3luBLmzZgUV8=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=hpNpZCwXYhvyYRBhdGH9VuNeOuiHLuwrO/NYHaCBrR+2zLxDLLXTDeKx0fe7dcXfbIaLGFtfq0s0Qg5Bf9NfzaqEYvBwJXu4mGmAu3r1lVEM2ZkZh/jx7pegg5L+1ZrXQWXZNgZxsfIsqWIWo1QpjTE3MDbWJQnRqbzp89IPxUc= 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=IIMQqhTP; 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="IIMQqhTP" Received: by mail-wm1-f73.google.com with SMTP id 5b1f17b1804b1-477594aad41so4883875e9.2 for ; Thu, 06 Nov 2025 04:09:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1762430953; x=1763035753; 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=3yuiv0vx9yyLGLEDTBN4UlwysSZbhC50Y+9LYCTdmF0=; b=IIMQqhTPHoCEq99MN0aN3ICpqkC20D1pIjN24wYGqxvve7zBWgILlbZlrMCp1orKqc UnxhDxLsoCcP6z4mlZPg9pYvnRKAfcvUFjZC/TmdlRRT9z19DQ6z/lTxIbFmDgSo8OhB ronGJtU0mP6VC41TSNj/iGSIZ8dnl3cVmOjk+qyyCl+r4XZnCjzF3oxACm1G429mUdDo YfZ01GS2zlU/Gw5YCrWgiKsv71Ph0vqmGs+WmXsq06ukJLx/jmDR7eCqIGPqgRa8zvH5 fDpyPTKcZUJgyC+ZTbR8Sm4re4yVObeBpwRoqoiXj3KaGf/QDVPwTVgHMrjNWyaf2xYd 5ttA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762430953; x=1763035753; 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=3yuiv0vx9yyLGLEDTBN4UlwysSZbhC50Y+9LYCTdmF0=; b=W/lO8QkqoDSUm79uXS5ARNT1cxrXPNG7kmlJ04tlgXBDmmVshX2CLXkAeGwG7dbgti Yl7rwV+VCm3FcYIP6hV2Bnf8WZC4XNphp1IFPcsH4iWndGy44R2gLnjgn6bVM+Q4Q5/q LkkIcOgb8r4/gNXDkDMPDUzIVwwKYypo2YmM6gdXtxE8Y3+U/c5lm9qfWj6p23fYZKEa 91HRqQ0/rEFAZ0wqlkj/xCnxI0EwuvnshjmswA1s/+prsJX12iuvwzcsdjtwVy5HeZM1 tfaT6BIdEFaI9nWaXUUvPzAyjrcxHS9WQ2OnxDADaacneqf4jJTNHblPaofDEIYx25L2 nU+Q== X-Forwarded-Encrypted: i=1; AJvYcCWqI/fHq1D7zTXq5thHau2Q/QBaf/vlhgVo+BPHxHAmQCq6yo+yyUV1r1IR6yaBvXUFGtXENnfwZEmfsPE=@vger.kernel.org X-Gm-Message-State: AOJu0Yz8ydQDek1CKk6mDR0LV4Azy6xdvIzIzrg8B/0hIygR/FaQkqrO jZuOpQEQRD9m29EjIJKYevJ8keVOU0bPxyiqBQEpBjXvKp2wt7rh2P9re3mdpr1JZPt3TU5umDT b39mzGsX8kf5JeZbjaA== X-Google-Smtp-Source: AGHT+IElAaFWCI339crOQYyZTbKzwIvBHBPj8kWMdaYs2aO2RGlRlbK/3kO4EQXfMe39+BRsQuh9Y8FQiiwzxy8= X-Received: from wmof6.prod.google.com ([2002:a05:600c:44c6:b0:477:40c1:3e61]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:5299:b0:475:e007:bae0 with SMTP id 5b1f17b1804b1-4775ce1610fmr51085735e9.16.1762430953730; Thu, 06 Nov 2025 04:09:13 -0800 (PST) Date: Thu, 06 Nov 2025 12:09:00 +0000 In-Reply-To: <20251106-resource-phys-typedefs-v1-0-0c0edc7301ce@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251106-resource-phys-typedefs-v1-0-0c0edc7301ce@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=2328; i=aliceryhl@google.com; h=from:subject:message-id; bh=EyMMNtp0mSRcwaDDRTyBRK9QbQwJ9nF3luBLmzZgUV8=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpDI/m8hRP7JN7T3KPKvhKnddfYjNgyza2uOyvG GXoq/hy16mJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaQyP5gAKCRAEWL7uWMY5 RkwJEACMzGjkNbU7MWw7DXBuSGxCTFwsEw5B+6RiqnXNmuh8ueJRlmmso/cKtUkBkV5ouUtc2F7 yoqVpS/PO6ZEmhxFsQcZlN8XZB+pv6bTaXp7QvdtLWd0cqh7IhAm0bgC2EngKN/Ekjih7GBKBTa taYdYwwI2b4MY/S/ocbaqG0Zi1lHwbR3DcwXbv63f5MMqnl95O6pRK6HMop93UNVmnNo9E5ULMS hvu/g03i/uBgcS9/kZSxOSQEpEbxc1tU2r3WLQT0mTk9g6atb40Wfxb9e67OfKxdxyeeYToV4gT xIRBzzxc0dwG9tqb1dq7fM8KE+TIaNouAZ5shf451cJjgPd8LuDZofUuhtNULsH+lUl6KRWAUGB R3gS/6YFlsNZ/iAsFTHLKJnWqNjqC7nklcuIQKbHv7LrvwDhFEOTBrkId4yhSCKiqVePfL5GW9R GEUXpzrMsP51oxDXuQPqmf0Q/uYX0cMfNLjEZKsf9d/H5R7l46fugPivXXnEs7CYw01m6q1Zui5 8UYK9JbgeUYOs5NaUxSTWgENUXoMRnZM7z3PUcAh2aO3DUjcLD0unWzkcXdlr9Zk3E3J7vYOGUy 33YzEp+R+Ba69BMRcjpQaugcE0LFhWMHYa82Ez+GixWr0GEAciE7IL1eyi0ZUEu9QxYnpHMJApx WVcndpXIq9DUIKQ== X-Mailer: b4 0.14.2 Message-ID: <20251106-resource-phys-typedefs-v1-2-0c0edc7301ce@google.com> Subject: [PATCH 2/4] rust: io: move ResourceSize to top-level io module From: Alice Ryhl To: Danilo Krummrich , Daniel Almeida Cc: Miguel Ojeda , Boqun Feng , Gary Guo , "=?utf-8?q?Bj=C3=B6rn_Roy_Baron?=" , Benno Lossin , Andreas Hindborg , Trevor Gross , Abdiel Janulgue , Robin Murphy , Greg Kroah-Hartman , "Rafael J. Wysocki" , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, Alice Ryhl Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Resource sizes are a general concept for dealing with physical addresses, and not specific to the Resource type, which is just one way to access physical addresses. Thus, move the typedef to the io module. Still keep a re-export under resource. This avoids this commit from being a flag-day, but I also think it's a useful re-export in general so that you can import use kernel::io::resource::{Resource, ResourceSize}; instead of having to write use kernel::io::{ resource::Resource, ResourceSize, }; in the specific cases where you need ResourceSize because you are using the Resource type. Therefore I think it makes sense to keep this re-export indefinitely and it is *not* intended as a temporary re-export for migration purposes. Signed-off-by: Alice Ryhl --- rust/kernel/io.rs | 6 ++++++ rust/kernel/io/resource.rs | 6 +----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/rust/kernel/io.rs b/rust/kernel/io.rs index ee182b0b5452dfcc9891d46cc6cd84d0cf7cdae7..6465ea94e85d689aef1f9031a4a= 5cc9505b9af6e 100644 --- a/rust/kernel/io.rs +++ b/rust/kernel/io.rs @@ -13,6 +13,12 @@ =20 pub use resource::Resource; =20 +/// Resource Size type. +/// +/// This is a type alias to either `u32` or `u64` depending on the config = option +/// `CONFIG_PHYS_ADDR_T_64BIT`, and it can be a u64 even on 32-bit archite= ctures. +pub type ResourceSize =3D bindings::resource_size_t; + /// Raw representation of an MMIO region. /// /// By itself, the existence of an instance of this structure does not pro= vide any guarantees that diff --git a/rust/kernel/io/resource.rs b/rust/kernel/io/resource.rs index 11b6bb9678b4e36603cc26fa2d6552c0a7e8276c..7fed41fc20307fa7ce230da4b78= 41743631c965e 100644 --- a/rust/kernel/io/resource.rs +++ b/rust/kernel/io/resource.rs @@ -12,11 +12,7 @@ use crate::str::{CStr, CString}; use crate::types::Opaque; =20 -/// Resource Size type. -/// -/// This is a type alias to either `u32` or `u64` depending on the config = option -/// `CONFIG_PHYS_ADDR_T_64BIT`, and it can be a u64 even on 32-bit archite= ctures. -pub type ResourceSize =3D bindings::resource_size_t; +pub use super::ResourceSize; =20 /// A region allocated from a parent [`Resource`]. /// --=20 2.51.2.1026.g39e6a42477-goog From nobody Fri Dec 19 15:59:32 2025 Received: from mail-wm1-f74.google.com (mail-wm1-f74.google.com [209.85.128.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 3545314F112 for ; Thu, 6 Nov 2025 12:09:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762430957; cv=none; b=h1vQjoshMKVVX06WqchNVowZovIwf8zGbM0rsQZcQWZ2S+RP+m+fHvXKaxO2LmUy6WklSNPLjX8UZamoa1R7LyT31bKL13UhMckQ5mWFBqi3F1ygw4FXf88c1TltPnMXiCJTR5sztfqVRJY5MQVbNcVpLbORgsKHMLBmp5u9onM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762430957; c=relaxed/simple; bh=Z0o/E9+LDcOuXxWJgzK2F5uZfv78/HzyRC5P+XWCMEU=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=eaiMrGU6CIgMukNQOaIUU67sYEbw18ogmD/oUaDAlqb1IyXV/AHSdOlDNF5bvFFBDPb6ClwNigSwiA6BFp4cpYznmZ5vlLO5dKLQreFY8HgzF77bNbEXpRj15DCfG8u4VuRaDh3BF3xMslI6XQrbG4P33uGxRKBrSJ9WxgutJ4g= 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=M3Rp+qIs; arc=none smtp.client-ip=209.85.128.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="M3Rp+qIs" Received: by mail-wm1-f74.google.com with SMTP id 5b1f17b1804b1-4770eded72cso15392165e9.0 for ; Thu, 06 Nov 2025 04:09:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1762430954; x=1763035754; 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=UEIGWJdzKObiVmPMXxxUBYNvOzm2LzV3LBkcvQkVvV4=; b=M3Rp+qIsOC0ZBekbOmJEh98LgJsM9RNyt35C/V2yh9yIshhs4Xpxz/Ox4vmiD1gBzf 1SU0v+Ol5IKDklPiHmDXw/gDRhL5Mkf17cNx9oN5hPd3aip2vp/MLhRhGlfzn+3BhX2o sRybnbMw6O9jo6NoBF+LX3Gy/9Nn1ZbyxaCk6OoF2gVjFJOcY4sy8yBPb+jwvcXJBCja sXfqhmPcQAh706/Jj7yFFMjkP0TqbmGbmJzYvs0Odq6mdeVIMtMlitefBg4wBomPScP3 gavI1LWjFFegKwAaRsrt043Mi0dlc2D7AYYM7gNXZKNWnwsuVuA/dE4o+s59t9E9Pwzd ERfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762430954; x=1763035754; 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=UEIGWJdzKObiVmPMXxxUBYNvOzm2LzV3LBkcvQkVvV4=; b=ZARbZzaUGeq0w80EOfSXXoFm909zIfVIltJ5LDlEuutJ4GzPWE6zTeXJ4L1dJ0yM7q rxj0VfBVw294f9PrhTT0QQXn6QYmgzlL4h2fSE0XPKZx6JgSAbwdNYswSqPRFjHLmD0I 65gaQmq5TfjH8xhm8YUIqZw40/FWWKDkk6QPH0o4PN7y3fPzENZ7+lWkPn/9nc1ETAGF FOvAkamSZTNPLz4t1CH3LHJ25S3vgQmXW7qcJnSkHRiSV6tJ5dt0AgK3OysB1D/RKVrD ZoaIokuXpbgCmHoDbKrhcfu+oiyFTeL3isOTua4tUEoeW0cAn95IADjMSksFCj0B2/G6 Dx2g== X-Forwarded-Encrypted: i=1; AJvYcCU6mbScCOOCWx1UU10SLMyC78eu1uveGC1cSR8YX6ZY/LYAXYX1XCkMHDR9UHjFD7JNxTb/js+l0IBas40=@vger.kernel.org X-Gm-Message-State: AOJu0YyNcJc0Xh9TXKaie69RgWQuG5H4u6IS+oyl9IVa2yNTblaKvue8 lKQ2hIyeUWrZfXuX8/K647dl7ENnmXDlkNjNhTaaZRxHHn6MXB5qtAW44B2pqz9G7LHDhOvNJYz xNE7XBKtdyafiRNlzJw== X-Google-Smtp-Source: AGHT+IF/vvs5ufvq/lcxCF7mkh4haHXUhg89Nr/pEBXemvk4J0V8PG8Q476djBJy/nxJnOv60LVcoNFPcu2z5sE= X-Received: from wmlu17.prod.google.com ([2002:a05:600c:2111:b0:477:17a3:394a]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:3b8b:b0:471:665:e688 with SMTP id 5b1f17b1804b1-477620986a4mr29031425e9.17.1762430954690; Thu, 06 Nov 2025 04:09:14 -0800 (PST) Date: Thu, 06 Nov 2025 12:09:01 +0000 In-Reply-To: <20251106-resource-phys-typedefs-v1-0-0c0edc7301ce@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251106-resource-phys-typedefs-v1-0-0c0edc7301ce@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=894; i=aliceryhl@google.com; h=from:subject:message-id; bh=Z0o/E9+LDcOuXxWJgzK2F5uZfv78/HzyRC5P+XWCMEU=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpDI/m/ZEjTQJ05OQzP8gJQIqLSNxfOaV1KqkQU 2IMr1tcdieJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaQyP5gAKCRAEWL7uWMY5 Rr/bEACOBXwt+CkUtft0v9bWbVU4nun6sj1tsjRImXUCG4esWt+YpgiQX/4tH4+rwOgX2GU0IBh 0DWSEDoO8GAavDyPlvYmwLuEmcQ4VPNsk5blbCwmf3ZOBuehVrn+UsZ4tK6yDC6yW7grQNKFGsM Zsm/Sf9p6sgN7qFpt5/9qJtCJ/FHY5Y48UrwF2XMmE97p80KWW/Uc1TyMLKWeDelCUbEj+tPaPp t0bN+JA+DmHlL6xuWhv3VD+jIuy5siB0bJU2swlZiWNMmpoylZTmBEdcEM3lp3lUqL8nfGtx7E6 URJnrDAHdiGl/Ax6guf5/ioMOOWANC5kU3IZ8Tsr5KwWR859vsYxmLrLFFagNWWFBazCmJGrHGQ N7cK0gOZCev1q69TuVks26vIN3erCTei0V+ip30sRrf5iH9MuocmLVLwqbrACUVvlOOJmzbFxL9 pWC3ZXs6RTA1xv8LXKTGpWrXVOQd3QjrfahumJWDHb9ltKjD5eo50w0eFauCvFbjO1oEyBLOGeo h38FzYcEeUm0CDJHc4EVF0ZGVRLM7Xsp3A03e2H363wWIKCct5RQw9U1wFWGQO3KrmdkmAptVUS KSTsBgDsMthPRk5LFuKtR+50hjMYLWldz/N3AwMrXG6qTiSA2FXg+qO3cAwarDR+umt5JzSyPjH 9JWxANRVwogVl0g== X-Mailer: b4 0.14.2 Message-ID: <20251106-resource-phys-typedefs-v1-3-0c0edc7301ce@google.com> Subject: [PATCH 3/4] rust: scatterlist: import ResourceSize from kernel::io From: Alice Ryhl To: Danilo Krummrich , Daniel Almeida Cc: Miguel Ojeda , Boqun Feng , Gary Guo , "=?utf-8?q?Bj=C3=B6rn_Roy_Baron?=" , Benno Lossin , Andreas Hindborg , Trevor Gross , Abdiel Janulgue , Robin Murphy , Greg Kroah-Hartman , "Rafael J. Wysocki" , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, Alice Ryhl Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Now that ResourceSize has been moved to kernel::io, import it from the io module instead of the io::resource sub-module. It makes sense in this case since the dma_len isn't really related to the Resource type even though both are sizes of allocations in physical ram. Signed-off-by: Alice Ryhl --- rust/kernel/scatterlist.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/kernel/scatterlist.rs b/rust/kernel/scatterlist.rs index 9709dff60b5a9a02ab466f3e4f1f52ab2e440d5c..196fdb9a75e788cc31093d83e41= 2ff4d6ca56b75 100644 --- a/rust/kernel/scatterlist.rs +++ b/rust/kernel/scatterlist.rs @@ -35,7 +35,7 @@ device::{Bound, Device}, devres::Devres, dma, error, - io::resource::ResourceSize, + io::ResourceSize, page, prelude::*, types::{ARef, Opaque}, --=20 2.51.2.1026.g39e6a42477-goog From nobody Fri Dec 19 15:59:32 2025 Received: from mail-ej1-f73.google.com (mail-ej1-f73.google.com [209.85.218.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 8303532863F for ; Thu, 6 Nov 2025 12:09:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762430959; cv=none; b=bHZdGW1/0bYmFQs+c3wbaNO0CMO+mN6GdNtHcQgQ/dfSfWUmSsN2MwytigSpDe/bIpNugxk4ln4eTfyYS3vOB95Md1L+1XTAup4spfcjbHEM5TXo5BBEzmIeF8cSuqx1u9la9WZh3p0q9lZx2+Djgl6dr6mycabgIUwpn1Ap9+A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762430959; c=relaxed/simple; bh=N05CdPPb9ETL4l1CnNbsvW0DFUOjIo2ix3kfvkTeeCc=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=k4Qn/SyjJ0fRKhuJSqTDEpP/ndZVGG5KzgWMwj5SR2lUUbC8KmyeODkVwJvs5yCh2fiYWiLWwCQQTF0LDZjfGCnUwTyDPdaycKKya6ZQ9zwcsIb6djUtcmw20GrjGQ2j6k3YgYU6WO29YGNlug2F4EeMJXTWyvzi8RMDakZSX9E= 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=DvbGdzwg; arc=none smtp.client-ip=209.85.218.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="DvbGdzwg" Received: by mail-ej1-f73.google.com with SMTP id a640c23a62f3a-b70be4f20e0so73287466b.0 for ; Thu, 06 Nov 2025 04:09:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1762430956; x=1763035756; 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=QLAnUrDI2pvarEVlAqbKGGVmDyTWyIE6rE0vKb5WBQQ=; b=DvbGdzwg/eyyHFEm8BYHxpsKo01dfzH46NjjEIAF4ZNuU9IMcB9GyhgAbWBTFhI2mi LTQ0/2f+14CVf8X0mLBENM4ezqsrWYKz8eaZSZYkSMxIDj0/wmGR7eG3jSu6eJ5bnTPy m5li7XNcwJ6fSP9jm+LYBrHU7cu6bvVf+J/cK9liKVn1yESfQ6lDs14vy+zXnEVd4l+F rG9VkqW8C0vbLnMk/8bVx3CoxWiEZ6Zn4dIJ3svdBJ5Kk/sj5aRJ1YItGrN39+OjZkel Iltd7XHNJZBOWlAcrefRRYciL6JtA4EE3A5YNnMCMpMvgPlm9Lbmg16cSIMmHU17BGs7 WNDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762430956; x=1763035756; 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=QLAnUrDI2pvarEVlAqbKGGVmDyTWyIE6rE0vKb5WBQQ=; b=Lra98hKp1XwPSGZBeBoUbaclDrso0KPaw5a4ieI4ZLpUu2P8oX9y0pNVO+5n5bdFK1 sKWJKPxQD71/RgVkVTJWZQYmzcSLDtj9AlujuXyHtzIWylrRf2KiV3Ex2iqtJ7vFRVvO tMdm62Dtuw3KLXn2PEiqIkTUALNCGBaZGIUnGcdC7nap97ZVhubYaZgDlAScjRH8PDeZ XLxK5NR5MO5Cws4WMVUrkynQpQg4992fJ47swbRr4Ex4prdJmE1zX3ozWJhkM8zUfx86 mWuC7ZIXeyGsRbbanLOmQQcN7Yv6Ixvmdz4aR32k6Df1RunY5YCzut1yBiZnZGxYATNl ctLw== X-Forwarded-Encrypted: i=1; AJvYcCV/bdPg1fhEqi1EPscCMUOSV7BY9Kt30Guo7kFW/GwajvV38w1J3XI7ZYeeUJ9mSwPs7GXVW/FRNWVpCtg=@vger.kernel.org X-Gm-Message-State: AOJu0YySFLXAfwTFt6ihWPDla7SjCq/XvIuKEnaSzorzLX2LEHc7PUT6 sK59Fnxvw0AdhVjZbsZnAOYGBw6lIDVBt5HFiqhVeYkJGPejLutjEk7NdtxE7Bpv+3A6m4Z+s4Q tLieBLy3e8vbSMffrDg== X-Google-Smtp-Source: AGHT+IHZKqqI2XUnv1NqDn2nFtMCabo5jj2vf8iQOxGK0AI5f769IUV6PRuiKrcsKGUscO20SxePO1gXrhAmLq8= X-Received: from ejcre5.prod.google.com ([2002:a17:907:a2c5:b0:b70:b6ce:57a8]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a17:907:26ce:b0:b70:4757:eb01 with SMTP id a640c23a62f3a-b72654ce415mr682874866b.32.1762430955652; Thu, 06 Nov 2025 04:09:15 -0800 (PST) Date: Thu, 06 Nov 2025 12:09:02 +0000 In-Reply-To: <20251106-resource-phys-typedefs-v1-0-0c0edc7301ce@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251106-resource-phys-typedefs-v1-0-0c0edc7301ce@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=4638; i=aliceryhl@google.com; h=from:subject:message-id; bh=N05CdPPb9ETL4l1CnNbsvW0DFUOjIo2ix3kfvkTeeCc=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpDI/mVsDWdH65xZZn0wJf/1RF4wWgKuZEvMdiG VquKb2PwfmJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaQyP5gAKCRAEWL7uWMY5 RumYD/sHpobC8Tj/jMQH5LPcsb9Ubds4RBkAdtKQxvMttfZPvjXUyzmfZce14LgEWE4V1kLRDsU gZrbGW4u2mb0IpcRpkKDZz3DowMuh1tX0Nn/+2xJ0Dn+oov3553j5cXBO3fPoThhWvxaJ4zlb4t wcxfBYCmyK/NyvfHOun6F+Mu4FhFAmMcY51vTglSyHOJ54VyOvBLeiVTUpf8joPwnQRuH5slaAb sXOO82yccX1CU3aKF5GchQGG1C/Af+u0BePT3rER1zbv5yaLZ/PWDyjuRZOQZwHZ2NalV3gcj20 WIqK1zowXfOYofFQ9qhNIlQDV/ZCpMB/YQdBd2kl85ztjseJtREj0tC12oLfmbG0V+TYTeh9qFY YnDuK7bJdOco2m8jtnfW6DiqI7IdZ/4FZeXrrd5anxCKIhaV4GkqYu+qNC/qVb/3raInEXAcjtP ntuxDtK5wGoFwzrK6P18BrMQqKuqihJ4ywflxLhoea2hWaGT28Q2AOZ8gRE/9RhPZytbNJEZGpZ lkxVsRzqDDi1L0ex9Y/An/CnW2HFqVBB/ZBfV7IUq9XShkgvuepUu0E+0WJVl/+E42nWAh3+LyM Q0176J+kGY3TY/sJuBritWrTYWG+CmB26jzhYQ5AVzC4OBgYj252mkGGxTNXAvCQgR35pzIzDyp 3drIolvaqL9X9KQ== X-Mailer: b4 0.14.2 Message-ID: <20251106-resource-phys-typedefs-v1-4-0c0edc7301ce@google.com> Subject: [PATCH 4/4] rust: io: add typedef for phys_addr_t From: Alice Ryhl To: Danilo Krummrich , Daniel Almeida Cc: Miguel Ojeda , Boqun Feng , Gary Guo , "=?utf-8?q?Bj=C3=B6rn_Roy_Baron?=" , Benno Lossin , Andreas Hindborg , Trevor Gross , Abdiel Janulgue , Robin Murphy , Greg Kroah-Hartman , "Rafael J. Wysocki" , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, Alice Ryhl Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The C typedef phys_addr_t is missing an analogue in Rust, meaning that we end up using bindings::phys_addr_t or ResourceSize as a replacement in various places throughout the kernel. Fix that by introducing a new typedef on the Rust side. Place it next to the existing ResourceSize typedef since they're quite related to each other. Signed-off-by: Alice Ryhl --- rust/kernel/devres.rs | 18 +++++++++++++++--- rust/kernel/io.rs | 20 +++++++++++++++++--- rust/kernel/io/resource.rs | 9 ++++++--- 3 files changed, 38 insertions(+), 9 deletions(-) diff --git a/rust/kernel/devres.rs b/rust/kernel/devres.rs index 10a6a17898541d4a0f01af41f68e3ab3d6bb0aca..e01e0d36702d38e9530a2fa4be8= 84c935c6b5d0c 100644 --- a/rust/kernel/devres.rs +++ b/rust/kernel/devres.rs @@ -52,8 +52,20 @@ struct Inner { /// # Examples /// /// ```no_run -/// # use kernel::{bindings, device::{Bound, Device}, devres::Devres, io::= {Io, IoRaw}}; -/// # use core::ops::Deref; +/// use kernel::{ +/// bindings, +/// device::{ +/// Bound, +/// Device, +/// }, +/// devres::Devres, +/// io::{ +/// Io, +/// IoRaw, +/// PhysAddr, +/// }, +/// }; +/// use core::ops::Deref; /// /// // See also [`pci::Bar`] for a real example. /// struct IoMem(IoRaw); @@ -66,7 +78,7 @@ struct Inner { /// unsafe fn new(paddr: usize) -> Result{ /// // SAFETY: By the safety requirements of this function [`paddr= `, `paddr` + `SIZE`) is /// // valid for `ioremap`. -/// let addr =3D unsafe { bindings::ioremap(paddr as bindings::phy= s_addr_t, SIZE) }; +/// let addr =3D unsafe { bindings::ioremap(paddr as PhysAddr, SIZ= E) }; /// if addr.is_null() { /// return Err(ENOMEM); /// } diff --git a/rust/kernel/io.rs b/rust/kernel/io.rs index 6465ea94e85d689aef1f9031a4a5cc9505b9af6e..56a435eb14e3a1ce72dd58b88cb= f296041f1703e 100644 --- a/rust/kernel/io.rs +++ b/rust/kernel/io.rs @@ -13,6 +13,12 @@ =20 pub use resource::Resource; =20 +/// Physical address type. +/// +/// This is a type alias to either `u32` or `u64` depending on the config = option +/// `CONFIG_PHYS_ADDR_T_64BIT`, and it can be a u64 even on 32-bit archite= ctures. +pub type PhysAddr =3D bindings::phys_addr_t; + /// Resource Size type. /// /// This is a type alias to either `u32` or `u64` depending on the config = option @@ -68,8 +74,16 @@ pub fn maxsize(&self) -> usize { /// # Examples /// /// ```no_run -/// # use kernel::{bindings, ffi::c_void, io::{Io, IoRaw}}; -/// # use core::ops::Deref; +/// use kernel::{ +/// bindings, +/// ffi::c_void, +/// io::{ +/// Io, +/// IoRaw, +/// PhysAddr, +/// }, +/// }; +/// use core::ops::Deref; /// /// // See also [`pci::Bar`] for a real example. /// struct IoMem(IoRaw); @@ -82,7 +96,7 @@ pub fn maxsize(&self) -> usize { /// unsafe fn new(paddr: usize) -> Result{ /// // SAFETY: By the safety requirements of this function [`paddr= `, `paddr` + `SIZE`) is /// // valid for `ioremap`. -/// let addr =3D unsafe { bindings::ioremap(paddr as bindings::phy= s_addr_t, SIZE) }; +/// let addr =3D unsafe { bindings::ioremap(paddr as PhysAddr, SIZ= E) }; /// if addr.is_null() { /// return Err(ENOMEM); /// } diff --git a/rust/kernel/io/resource.rs b/rust/kernel/io/resource.rs index 7fed41fc20307fa7ce230da4b7841743631c965e..5d9d9f01d91c3b8b13e4837d4fb= 19a786d7720c8 100644 --- a/rust/kernel/io/resource.rs +++ b/rust/kernel/io/resource.rs @@ -12,7 +12,10 @@ use crate::str::{CStr, CString}; use crate::types::Opaque; =20 -pub use super::ResourceSize; +pub use super::{ + PhysAddr, + ResourceSize, \\ +}; =20 /// A region allocated from a parent [`Resource`]. /// @@ -93,7 +96,7 @@ impl Resource { /// the region, or a part of it, is already in use. pub fn request_region( &self, - start: ResourceSize, + start: PhysAddr, size: ResourceSize, name: CString, flags: Flags, @@ -127,7 +130,7 @@ pub fn size(&self) -> ResourceSize { } =20 /// Returns the start address of the resource. - pub fn start(&self) -> ResourceSize { + pub fn start(&self) -> PhysAddr { let inner =3D self.0.get(); // SAFETY: Safe as per the invariants of `Resource`. unsafe { (*inner).start } --=20 2.51.2.1026.g39e6a42477-goog