From nobody Fri Dec 19 15:59:40 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 E80E23002BD for ; Wed, 12 Nov 2025 09:49:03 +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=1762940945; cv=none; b=QZBgGnq4SxJ0XcTBR5uxI1zkjrAxGucPRMp38NsMaIJv4X/Zga9RuuVbP5wmAGktt1FWxYghFZF61aq3T2vlB7EZAk8jm8lrX44Sb0vIdvPbiGB7gdRkTEquzKhYAHJ4GcsfBhh/oDhSGxmTKkSa1PjhE68strB6hKQm6DlCBlE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762940945; c=relaxed/simple; bh=2smKaxaGfjA3jN7eoywJ/ubfJHjD6vhxAHb95I8iC70=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=ELw6rJSus8sjJJYqIijRV2Kb3/qEVXNSAx7xo8eimZiXFgvh10VXOw5JmSyDJTj8hcAvhxF617cRWY6oa82fBElDff2Q7/J04ZrSIPKTgfCG0d2pEiSErcQlN8EYXSJRyu+7artbiSo/QW1xzMWF/lMUyWKxuYg/N1jJYD0I7vA= 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=u0wjOha7; 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="u0wjOha7" Received: by mail-wm1-f73.google.com with SMTP id 5b1f17b1804b1-4775e00b16fso3880725e9.2 for ; Wed, 12 Nov 2025 01:49:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1762940942; x=1763545742; 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=Qrl17OppxeBSym1ajwaqJ7MA3ZvBOcIwprPXcbomgws=; b=u0wjOha7XNjUCu/9Wmep3giD3DSk6kLtXHH+ZClbID3Lv2+z7ilkAUCtnO98BebPyN Ajvf8mPpnjeQqnQB3yWC6g9eq4Rmn6Yq2EElirWIaIostYqPmB65/GpVXrmQxOkA5LXl wk6syxly/Z5he1lC/cvrykFI8CX9C0hWCWpiSi4koR9F7KitXYThH+OXk8gxBwomhSFQ ReDhiLDbXKCpgX2nkJ2y88vKoA1yVSUguPbAsDL6l1hMZEfTGSXKZ2Bv/iZwjsRwGzD6 t71dB38QtJh2TV2hPfuUni9brTo/tjRElpduNh9THK2j42Bl/bLQ/2Hp/1NbUfkskFxR J7WA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762940942; x=1763545742; 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=Qrl17OppxeBSym1ajwaqJ7MA3ZvBOcIwprPXcbomgws=; b=KHt8jL+Y0RvGam6oatJ0IqTIvVitruUB3sfxBk1+MK/HwsM44XWw0q5/lx3o6InJat KnDoYBF+CzULddjdb5nhAuQT370+hwaDoLpjP5x3vLbzuwkXaWEJ0MyOenbc+L56exPK dXjhfJ3OMTwHlon8zEAZSzgmPmnZmisSrlm/K9zNn/UKQmyLsS1Ai3+RrFNzU9hits0U nwU7MYiS0s8RfQXH0VS++7Tfy4Ef2MWSFO3n+sZzqeHePQ7lCfLpwkXuLjgHb95G5Lx+ VBofpndj2vFJxvPc3Ha+YY9y4+YPmTOrvN2fihEWsIvZPOwVPZLES58KPpNkZ6bg82OY YgxA== X-Forwarded-Encrypted: i=1; AJvYcCXhpCvkwtS+OvmdBOg6ZF3IQim6eFK32kXLK4aLpudA9XfrTd/sYkFznpa67KOlz6e/7bLHqPlzUm6xKIU=@vger.kernel.org X-Gm-Message-State: AOJu0YwHBBLvR0IfRqt4wRzA5HJfvfsITCtuGr+kMZAIsKrS43KshtrQ Jr7arzH2xHFxDJgES3Bw1pyuSxmP8+40GUBHxV6n+qT6G/A4HUV8T46X86hBGJXPlwqr+97xf1D 2IWFqwZaFLatkRG23oA== X-Google-Smtp-Source: AGHT+IFrxZ/HZNWvjI/D7i6XJ+FEDkE7WUcw9QB+SlJhV209ssd6HjLYRjU3vmWWmQrGERlsO+5ydyGEBKOJzqo= X-Received: from wmpr17.prod.google.com ([2002:a05:600c:3211:b0:475:dc85:436d]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:1f08:b0:477:7cac:50a6 with SMTP id 5b1f17b1804b1-477871c3627mr19832815e9.33.1762940942341; Wed, 12 Nov 2025 01:49:02 -0800 (PST) Date: Wed, 12 Nov 2025 09:48:32 +0000 In-Reply-To: <20251112-resource-phys-typedefs-v2-0-538307384f82@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251112-resource-phys-typedefs-v2-0-538307384f82@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=933; i=aliceryhl@google.com; h=from:subject:message-id; bh=2smKaxaGfjA3jN7eoywJ/ubfJHjD6vhxAHb95I8iC70=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpFFgL7xc1g0VGFv5zm16lCtR5MHYy9Tm5FjIST BlIJVvT4e2JAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaRRYCwAKCRAEWL7uWMY5 RhZbD/93rP79UMls8x5pRqpQZXFzZMxrGh1SLxliDxgWBgx39br9H8lVwbgvUjvPavRuoz+XDQV 6T9gtmJFcwszgM9GKOKfxsZCpY711dvoWuqLPGxmBViAwQGJrFOPyugh1SSANTD6dYQMN3Uj0tO Y5I8BmfLs5MCRQJylCt9Jvx0rMV8U8TRbcca78lhiEcCMEddZi6RqWde0Y7oO1YqerJzfcMEGf5 DMqWc1B4wpj4/H0ZvHkN+O25U62//CMcX2RDVp7JGcfn9s6xKrL8nn2XWQ+yMYPoImaEg3li0Mz ZBBMWwS2R97fnn7kc2IsZPPinXhZ0oyMIWu4Wktqir6Fz4tblbmPLMWqToL1HSmMLnwbIsWoYc+ ybcqLa6je4lS3Op9gWHHGKTABEAuEteUC30uPZjPr0UxlkWF3EyAu8soaYVKkTfZO/bDa0atKxz Gib8EMDVK+K8yg7HCUIV4EcQtgF6G2458RhvnqyteTynNqga79ZCGvjD1ZXqdd749L8oWTDzaN4 IlFkCKP/bye8+xt281kT41TPRqbkEw67H4UR/MdEuw8TZuLycXvR4ECEQMGUnGDnwlDmkKGkP4t wYEDaC+3v0WaSAueiIZVJdD2taqcAlWtet3Udlfj4K5dX5o18w6ar9sH8Rhy/OXt7FPiVlETmNC +V+q7kIo0YGi0qg== X-Mailer: b4 0.14.2 Message-ID: <20251112-resource-phys-typedefs-v2-1-538307384f82@google.com> Subject: [PATCH v2 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 , stable@vger.kernel.org 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. Cc: stable@vger.kernel.org # for v6.18 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.1041.gc1ab5b90ca-goog From nobody Fri Dec 19 15:59:40 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 444B03009E2 for ; Wed, 12 Nov 2025 09:49:05 +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=1762940947; cv=none; b=awOBQnJ9lRqmbleY9gmm2p602YEUPkqdeoTrWpk5PRaT9usAuTt15HJGt7MJgkl6BmoAM5ynwZEN2hzpS0xweTj3rJDDeLeIuoXApZEpRSUX/8BLaj/U9bGuvcmVfSkH6xOZ9aaJHXh9LLNvDmWLJya41kiI1/lWHhfszNJYltM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762940947; c=relaxed/simple; bh=AGsD4T3gMNQ1KRT7lKUBBW6vxzfVxu5iKK8s0HzZNZs=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=jlcdBwvWlBGHR40J7qvpY8wW/QfWYmTw99nLfdu64xgGXWN46EkJu8T7Bt+eJH7NPr23eOuKJp6wbfAe7WSd0e70HpCuKhftYY6nOz4orpyKguZVbMY0rR4DtAXQZtjXcFTtsXrEv+MD1FG4mwHaf4fu3dgyXPS8ET1a1zAbBJc= 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=rUAqT5pM; 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="rUAqT5pM" Received: by mail-wm1-f73.google.com with SMTP id 5b1f17b1804b1-477632ce314so2960745e9.3 for ; Wed, 12 Nov 2025 01:49:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1762940943; x=1763545743; 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=wJECfAsHB36DMhlozaEm+9VXAALH7iGzmi/xISCYeNI=; b=rUAqT5pMyCwuOG4m9EwLaTY63/aRSye4EJ+lUuyWGPec7VqABx0B4SEsQ/1MOt+fCn KZ5q+SL6OIixoPunu5jvYztx20Co8UT4mNY7BcqpFzUntCsbjZsRNHtk7lLIbYFZM2in Y9mC6DELuB0FwBaF2L8U8tDhVg08eyEtyq3Nj2zBqeGxX7cHDESLCfmRh3XZCATT2RnU 0+2HbJbUye6Hmmw8mdNwzEBRLgWp7ceRss45M26wjOmRg95Mq095BOacIy3tzl64bnOb bu3TOw2U9tgZn6Uogh8+7xnxRaFCn30j4H2t+UufC1GRL9+pdvoHmr+3hBG1WgpcTfnD d5SQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762940943; x=1763545743; 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=wJECfAsHB36DMhlozaEm+9VXAALH7iGzmi/xISCYeNI=; b=CEhp9HydFj3dKurt4hC5TEyocvBpvR2RprczydOFcUS+EL6NKeThlq36SDcDhA4fK/ in3jf0JJo7zxmi3t6jDa90+y9y4oIhmAf73fh9C1Q+dCFlm/BLIwEyIOdrA+oEUxgxYF 9OBSysxdv61TRyr1ZcMPkidtczLZYKMcyY/98MrAnKwFiWZ9CpUjari3OgoKdGiQ6kmI sHHlUbgJNA1Kz1h7NG5b8r+3ydzGjcsDARjZT9m/T5HCkqgfao3t8Kkxr6xJxE1p2YUv OhKN93bvAPkjj6FP5eCbppnFdqN0T+SdrxooO2GqmwqACfKPz+ZHbGgY9Qn1Zq01zUnp HsKQ== X-Forwarded-Encrypted: i=1; AJvYcCWXSY2h+hGHD6EBWYQLeHYWnaJwH9FB9czIP+8ccClX4XWU+ewut+e0zgIFSUSgmrNw8fimmoUUpI2U8Ko=@vger.kernel.org X-Gm-Message-State: AOJu0Ywy7O3vV9F0FGSybRONlUV4c/Vs2zcEIuYKsKhhNfTLAB5Qbfp0 N21Usr14zsub1ZgdR8wlqJafMGS0ELwIb8/Jd+HEj35S2hFOhOqxed9WAd1GVmQFbmp1PO4eD63 LUDeNDsAxW5TNDeS6NQ== X-Google-Smtp-Source: AGHT+IF9HsqU0y7NwTtXTx+f+JzAdVqRcmDlc5vqaSZf2ouip/K5EKW1gkmsBGd/TFgY8Ew6kQuhb/VV435aZMM= X-Received: from wmin8.prod.google.com ([2002:a7b:cbc8:0:b0:477:561f:772c]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:4695:b0:477:5c45:8117 with SMTP id 5b1f17b1804b1-477871eb76cmr19894835e9.41.1762940943550; Wed, 12 Nov 2025 01:49:03 -0800 (PST) Date: Wed, 12 Nov 2025 09:48:33 +0000 In-Reply-To: <20251112-resource-phys-typedefs-v2-0-538307384f82@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251112-resource-phys-typedefs-v2-0-538307384f82@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=2368; i=aliceryhl@google.com; h=from:subject:message-id; bh=AGsD4T3gMNQ1KRT7lKUBBW6vxzfVxu5iKK8s0HzZNZs=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpFFgLPLvMiSe5A3WoV7ftpvtqc+RY0+RozAJ0o zyS7UQJDmiJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaRRYCwAKCRAEWL7uWMY5 RswTD/9woGknvS2f4z6xYZAQn7MpVp5wLdcWesznjd5WYtQvbbhDlw4UVBl1SWosAwpGiJH3m0E 6YAQQVSL11schJ0p+KF/hl6DbF/nS1WXRDltJZiWBmgxRcPt/O/4UrWjnKvMdA++IA8Ts0m0M5Z FUeI6PwIqk7seOkQhRUCqVNx/P+DKVFQ7VvO5IhUlP0H8oitTKpYLoaLo0bwZWg01q9KxBTezzn kb3Um/nnOq3+TExTgUaQmidiWZqaVOSVCsQaEWclJcpgplutf+vCni+7whpBUUFS/gO/UiYTBMl WuBaYsaUAZUecxZBkl2z3LSTIfPz5GN3GLqdpuUZS9i0vmPo+ktCwLf4S+N5STuPkbviVAP3S7N UJvG9Oqa0vJSUu5xoNUJjVqnKnt2lYiZrmr0gCj3dW4rKRliBFKb0laDikWdJChjj2l073xd1Ho 71HGQPixcryaHEjQWPCZ5iLrK4RTYCLm6p2ioDrbgX8MDsmPZH36wUwryAUYI0FX32fqahDJd5/ PrXFXA3gdUsVKSPKyDlMMOyGSeJfpAEaPEHHbn8LXnHG182SXjDT67nxQWBokpphc6804MqOpB4 wNJbW7sozGHZkhaInUdxKOpCOF0cZFlJUMw8ZrqLDCf0Xb0lVz6NwUfKqeiTYvOZsqDLjmr4ZKh nuVnfQRy1Efi5nw== X-Mailer: b4 0.14.2 Message-ID: <20251112-resource-phys-typedefs-v2-2-538307384f82@google.com> Subject: [PATCH v2 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 , stable@vger.kernel.org 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. Cc: stable@vger.kernel.org # for v6.18 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.1041.gc1ab5b90ca-goog From nobody Fri Dec 19 15:59:40 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 14C5A301466 for ; Wed, 12 Nov 2025 09:49:05 +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=1762940948; cv=none; b=aZG72Xp4ByLeEadLRCOlo7wf9TmwFPxd6aZdu3+w00o4iY1qHj4GdXpISXTzbn+d8ZZDMCldh+9AsTDDza08yaIm8XRFZzOmPkTNb6HHtKFUZFcL/s+uKPk0eB3IH3vzUxe3qVHRVEBBnk9/cUwb7tyKgqmvhGHpTPpY5c4eBnM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762940948; c=relaxed/simple; bh=Qk+X7JoVA3OKBTJXGI41YscCwbZpvIcMLhxavwN0BuQ=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=dvWLW7KFgGydczCLITpheCX0XXPV4oBxVGSzYRccqWIZ4BXQ5JjAd6MAcG5FMt1cy05pVj/l3mkkLGRBwTkygzNFZmb0rsoqTAqPdbzJc4EPpmk+rfrnZkWiuofMXcSdZKXzSudme8rmB8ShM2YYCr0AqoGZQoXwy/X39tluSJk= 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=tExaGUq6; 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="tExaGUq6" Received: by mail-wm1-f73.google.com with SMTP id 5b1f17b1804b1-4775d8428e8so4797725e9.0 for ; Wed, 12 Nov 2025 01:49:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1762940944; x=1763545744; 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=sLvYrtTgK6rKdH2JSyNHP7LJ6X5YHzCEJHGgBCNRd1g=; b=tExaGUq6LUOylsscdwOAFwEsHbkKaVkHlZceqGz7Oz0xv7ewmEP4yFWS9SFLIU4gQO L06Efx7bftXRW6qqj8+/biFpWLlxA2krnwX+eX/H5sI3q2Y0TAu5KOxojN/Lpt4Zhbrl we8+YnUEqk1c/GsOnW6VZqEyZC36GfNYV5edL8r+jhFmNsuikkTFA5V2IHwilYgOYETx 2feCPtNAP/NqaRTww7xZJ2693Q7dP4eITWW4AiC9kfulP6jiLvq+MPfbuSYHY3PTnqYS L0/z5ud+aqEsIRtVADpBicVEYbosmjcpLl4W0WHqW94QozkRm2Q11Cx1U6KrMIsxWlJm 1vxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762940944; x=1763545744; 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=sLvYrtTgK6rKdH2JSyNHP7LJ6X5YHzCEJHGgBCNRd1g=; b=AO9KRBJ4pmcCdDnDUjZ2MFSqUpF2VwZlsw0uW+CxS1fd4p6Cm7Xym+vMvjQfZT2ybg h0CagJ/FbkPMqqsLm5Cx0Ul2ml2hCn03CYR6lqF4xio0xl9qIZHDbMotz1ayrBgiUV3M 3UHV+a830aQTMIYP97WFD26nV1BmfQSxns12KJsX9IwT6f58tvF2b9DgG9h2X1akys+l 8nDl0gOMN6UfoQwPo04f87EUa9u5CThAA5eaqQLJ7LZjoWGAfaIZagtpLliuLzTn/bKi 8zUpNSRkBCC69sq58+lQQjIKlmEgRJeAvgorqU3/UA6ufMQB+LYFXItKH1nsa+eH1cr5 qUlQ== X-Forwarded-Encrypted: i=1; AJvYcCUHqTvaPPbd2ESBWmp5RMj/C3c9lIzOq5j3AX2lRf/MalDxIBZwb+jUYwdR7kmO0zLZXwhMgogES/1HQo8=@vger.kernel.org X-Gm-Message-State: AOJu0Yz3Nz8IUTLFCuQ9vxt1zOex12TAT4d3lDL3zo4cvQCkHjPjQ4ov PZZopN/uuDf19q5BSnafLCRd1uupGG0Qe9xvzI+hNJj3t3zzOu0BPLydxmuZizUwJGT5W4nNkp9 iG3vkA8Z/4asKAjmOcQ== X-Google-Smtp-Source: AGHT+IGQzCgUYQ9lQzKZ+wnG/A5p5tZEfe3+/e/x1nE6ewStdCdDyfqM+EebIA/uOMWl5shnUfi8YTdYl6LsGJE= X-Received: from wmoo8-n1.prod.google.com ([2002:a05:600d:108:10b0:477:76c6:3a81]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:4f8f:b0:477:7bca:8b2b with SMTP id 5b1f17b1804b1-47787059f9bmr22032425e9.15.1762940944562; Wed, 12 Nov 2025 01:49:04 -0800 (PST) Date: Wed, 12 Nov 2025 09:48:34 +0000 In-Reply-To: <20251112-resource-phys-typedefs-v2-0-538307384f82@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251112-resource-phys-typedefs-v2-0-538307384f82@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=Qk+X7JoVA3OKBTJXGI41YscCwbZpvIcMLhxavwN0BuQ=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpFFgLFEz4i/CMZb4PR/28EU4U7QNVBZUr+GfST P91mj1NpX+JAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaRRYCwAKCRAEWL7uWMY5 RsBXD/9sK3WYVvrASMq5I7tYjmkzx60ePNEplHnG/fGp2unAOjWdtu6aJ8KEg1RXGrPWm79wcB6 EzcnluhJsElsycw1SgyTf7yVG8Deg3TWPzYwGb7J7ky3Qie6JxVa2ageDHsjLvsj7khXqXfcPEl qfgv55Qm7Z0gTvv+KQj7ZSHwU2d2ccnRGZ4Rq96POu7wZPHd+Vx9D3v6vZ3zMv8R8kG8iHayT3W YP//Qag9AXlcbAlqQSjqM2hVto2Q4nOvJUWPMErf8wzf7EVXC3UPz+uVZXwkWAsrDmiVGYTDeMl 4tU1OmUrI7TsqoRIqG/gtjEBw1/oOrkOJmeRS1t7BBDaa2ZuT37h0nJyMKIMQVtnVdo3CYZFU6j hHs+mHH14NuQwHiHP3D461MItacTLRn1w2d22o0XIni381xeJfI16QI9h5Itrsk59ttKRyzPebe NSC/0r5nAotdLXUviEtVoMrP3K8Z7qYFhSnfe4WfIQcmaDcFl2qYTmAB1LedLAvjO/sguUhnOQe vgitz9o4EqDf9NS4Lpzjng9QK+7CSCVfpldTPYtWdzNsufLQH240FUTzWl172W8R+xQXt00OPkx JDKZwADMoZ7nptixSWGQZtsASHoChDOXlhDzKduzv8AE/1nhxJAII0kx5AHJqsBR7J05/2OnpLn l5ueEPNLVdLhVZQ== X-Mailer: b4 0.14.2 Message-ID: <20251112-resource-phys-typedefs-v2-3-538307384f82@google.com> Subject: [PATCH v2 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.1041.gc1ab5b90ca-goog From nobody Fri Dec 19 15:59:40 2025 Received: from mail-ed1-f73.google.com (mail-ed1-f73.google.com [209.85.208.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 9E13830170A for ; Wed, 12 Nov 2025 09:49:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762940950; cv=none; b=sOMCN0DUIRqkWgaAIPO0APUahHXIlIVPFhEyd1ynuImvBtgUsMZu9QrvqbY3DQ/7s2qsJRdSujV76BUvT0URuyevhMdgzv0Md1wqqAFyPmx+RcpJ+6Ijjx4Sm2lnAbMVqypZCbKw3s7q+BloKp2vi5T77fknViO3EUchkfYlv5E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762940950; c=relaxed/simple; bh=JnroIx5Mod0LvWzfxsHi8lC2HMAygcMfxnURZ1dW9Z0=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=hUpECMKd5TdLE1SoFu7gq6/dqycyCNounuYTTmut+6Ikg/vLD6UFKV9pgFZqWaHRwLwKgiKI+oTfZX1QJA+KDrYO1DamKZ5rVJbUuYhPMV1wHWmU4euzPubTNYWUMqhrxVsXr5uF+bnqce9Vwv91I7iMcodhY9519ZGFZvwbIeY= 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=vVpr7Ih1; arc=none smtp.client-ip=209.85.208.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="vVpr7Ih1" Received: by mail-ed1-f73.google.com with SMTP id 4fb4d7f45d1cf-6417b2fae83so593518a12.1 for ; Wed, 12 Nov 2025 01:49:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1762940946; x=1763545746; 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=XgfDsUZ638nSlM9QsO/BjlaImnMhRtBDf+7UnlFjNC8=; b=vVpr7Ih1G7xxs1FHFMg7hvv0X/u7djAzPcXsNyEeLACQW3st1YpMcLSfjEp1l1OonA HTS3ScdqNMZ6+jzHEP8lMpcp3bRBP6xsgLMhGDAIcax5p8nXL9+jKXTyqWnFc96aHB2K A5QE0HrNWTulQkcCXWO0xcUaAes3DqKtOS6aTwkeUrDRg75fBPahC3YzBSG0GmgFK1eJ uz1i7YOMf4tORRZFbXr2DiZeCRoZdITml6ZlvhdAgeQXS2VQQuxqICAxQyVEF7krnFWh O/UYZ8xsX85dHBsmQaZlIZx81C7wnz0wPuzXmgNlwE20Ru0gF5q37ZXuAAtXzjt9rbl2 KiOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762940946; x=1763545746; 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=XgfDsUZ638nSlM9QsO/BjlaImnMhRtBDf+7UnlFjNC8=; b=WaU2Bx/ZqtLzdhe+MtPq4N2SquPRUsMgXuuVULkCZYLP8veYqvBm3h9Pmpr4UP1iRe bq9Cgk3L7Hr+HOuvYADkaTSiZTBeLFq52dOobDIzlYjb56zVxbKtQybeg41ffFSjotXv IJK4BRFx2wSVyoHBcxHObGibjK8EeMfnocsisgnyggEEk1gKZUrfIo303GFpmXtGd3vy WPi3JJJA56o69g6Ma67ygdXQU5SfyOIh6quUk3t6IPkPE/4B0bo5Xdf0nwJQt06Agat2 5Entn20R3NlZlhDNshjSlc5ZTjHgaEouXWly2zs0OInSQ83BsvLK8ccw0t0XXV7p9ZR7 T7PA== X-Forwarded-Encrypted: i=1; AJvYcCUM6e6JZyB3hK77tVBjsWalsnHgH8IPO1+4uyAbPNbORitSHm6wM3TskzmVyeEInnnHBQvVm6K8IBITOjM=@vger.kernel.org X-Gm-Message-State: AOJu0YyIm4f48BfqQJNi3ihepA8G26NldsWvuNAyOePL9NxQtnKrgfBB pzLY9onG2pb7o3fxJXYBIFzu9qgfNa3iWv63tyTg3Izk8aZWAhmznSz61ulm0obGipET2tlZ3JU FkVbIngiUF3+CLnJ2XA== X-Google-Smtp-Source: AGHT+IE+cjLYnTFZuo5v6gTqC7tY+9gCgCj3XFCBabgexAOsp/gnMC81dLElIaB5dX/oUzHAaCm70diaCOcjx8M= X-Received: from edhs12.prod.google.com ([2002:a50:8dcc:0:b0:643:12a9:41aa]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6402:518d:b0:640:af04:d71d with SMTP id 4fb4d7f45d1cf-6431a530103mr2083350a12.22.1762940945677; Wed, 12 Nov 2025 01:49:05 -0800 (PST) Date: Wed, 12 Nov 2025 09:48:35 +0000 In-Reply-To: <20251112-resource-phys-typedefs-v2-0-538307384f82@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251112-resource-phys-typedefs-v2-0-538307384f82@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=4678; i=aliceryhl@google.com; h=from:subject:message-id; bh=JnroIx5Mod0LvWzfxsHi8lC2HMAygcMfxnURZ1dW9Z0=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpFFgMvhta5ZE+nVzvbAWjQ6Bmf4qj5MzJLHNql Vvajde1Zy6JAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaRRYDAAKCRAEWL7uWMY5 RoltD/4gZDgFyfkmyIQ8jz86Sq14oRcj4YA9tYmTwoVN1CNa0xK19cl2/YssVaGvVJxNcrFmImO X80ej0I0zG+N35qE9MRyjp7qUtarjOuVT2FKZtQi9EEtO4dipnF5LukHnEm4qrU1e9Eu3ML6x/0 mnqNVazTZYVsrshwe8rYpA5mYMCmapfaF/43rzAJarZD/cqEAlRD8Lg+JWsUsDj9KCFO4dras+e 7C6t/f1dRVt2fs0+hYv+sjqlA6AXvL0HY0/CYmF3nD1UKg8FftxzaJGvhwFDR7thPD7G5xlYEVi YXOOW0Mo9FLTi4UwCz9gY+7uT8SC8ZaWLsTv8slejFqpgFp6ITYWlxAFwi0Xw2u5+Y7Or1wquv3 j8hACH5nreHi4yUGKkzaVcYYZTEn4jMJqBS+GQGIZsxAQ1bG93z7+EVkE3iVH64PpADt3AeiOzr c7fVEe4qsBqRbFK0lHt847m0x/GNejvgS2PUnuKcKPlqf0guND8h120c+eQ3f0fV+8NvG57WSBH fjjjrIqrBEVvU8ySKVS/O3/EgtSzTBkKB80YAojHF8Y8Rdst/ZdpOfvpqRKoJ8z/szWMzUu/x+I RCaXvjlYMJupB0eimvFU2Q19Nkx5LKWWVxaozUnvB6gKZHgIkMAu1AbhH2cASzPLHr87k1Ceg8t BjyyHxyV1Vo33Hw== X-Mailer: b4 0.14.2 Message-ID: <20251112-resource-phys-typedefs-v2-4-538307384f82@google.com> Subject: [PATCH v2 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 , stable@vger.kernel.org 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. Cc: stable@vger.kernel.org # for v6.18 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..0e86ee9c98d840b44b8f8953f83= d31612fdaea46 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.1041.gc1ab5b90ca-goog