From: Danilo Krummrich <dakr@kernel.org>
To: dakr@kernel.org, acourbot@nvidia.com
Cc: nova-gpu@lists.linux.dev, dri-devel@lists.freedesktop.org
Subject: [PATCH 1/4] gpu: nova-core: align Bar1 alias with Bar0
Date: Sat, 26 Sep 2026 14:43:24 +0200 [thread overview]
Message-ID: <20260926124405.604707-2-dakr@kernel.org> (raw)
In-Reply-To: <20260926124405.604707-1-dakr@kernel.org>
Make Bar1 an alias for a borrowed pci::Bar in order to match the Bar0
type alias.
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
---
drivers/gpu/nova-core/driver.rs | 4 ++--
drivers/gpu/nova-core/gpu.rs | 2 +-
drivers/gpu/nova-core/mm/bar_user.rs | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/nova-core/driver.rs b/drivers/gpu/nova-core/driver.rs
index 0672a0707a71..9ce70703b2ce 100644
--- a/drivers/gpu/nova-core/driver.rs
+++ b/drivers/gpu/nova-core/driver.rs
@@ -32,7 +32,7 @@ pub(crate) struct NovaCore<'bound> {
#[pin]
pub(crate) gpu: Gpu<'bound>,
bar: pci::Bar<'bound, BAR0_SIZE>,
- bar1: Bar1<'bound>,
+ bar1: pci::Bar<'bound>,
#[allow(clippy::type_complexity)]
_reg: auxiliary::Registration<'bound, CovariantForLt!(())>,
}
@@ -43,7 +43,7 @@ pub(crate) struct NovaCore<'bound> {
pub(crate) type Bar0<'a> = &'a pci::Bar<'a, BAR0_SIZE>;
pub(crate) type NovaRegisters = kernel::io::Region<BAR0_SIZE>;
-pub(crate) type Bar1<'a> = pci::Bar<'a>;
+pub(crate) type Bar1<'a> = &'a pci::Bar<'a>;
/// Returns the Linux PCI resource index that holds BAR1 for an NVIDIA GPU.
///
diff --git a/drivers/gpu/nova-core/gpu.rs b/drivers/gpu/nova-core/gpu.rs
index 8f30186f10ba..1ae287c9e776 100644
--- a/drivers/gpu/nova-core/gpu.rs
+++ b/drivers/gpu/nova-core/gpu.rs
@@ -353,7 +353,7 @@ impl<'gpu> Gpu<'gpu> {
pub(crate) fn new<'a>(
pdev: &'gpu pci::Device<device::Core<'a>>,
bar: Bar0<'gpu>,
- bar1: &'gpu Bar1<'gpu>,
+ bar1: Bar1<'gpu>,
) -> impl PinInit<Self, Error> + use<'gpu, 'a> {
let dev = pdev.as_ref();
diff --git a/drivers/gpu/nova-core/mm/bar_user.rs b/drivers/gpu/nova-core/mm/bar_user.rs
index 8f4a27c1fd14..86b5d302188e 100644
--- a/drivers/gpu/nova-core/mm/bar_user.rs
+++ b/drivers/gpu/nova-core/mm/bar_user.rs
@@ -41,7 +41,7 @@
pub(crate) struct BarUser<'gpu> {
#[pin]
vmm: Mutex<Vmm>,
- bar1: &'gpu Bar1<'gpu>,
+ bar1: Bar1<'gpu>,
}
impl<'gpu> BarUser<'gpu> {
@@ -50,7 +50,7 @@ pub(crate) fn new(
pdb_addr: VramAddress,
chipset: Chipset,
va_size: u64,
- bar1: &'gpu Bar1<'gpu>,
+ bar1: Bar1<'gpu>,
) -> Result<impl PinInit<Self> + 'gpu> {
let vmm = Vmm::new(pdb_addr, chipset.mmu_version(), va_size)?;
Ok(pin_init!(Self {
--
2.55.0
next prev parent reply other threads:[~2026-09-26 12:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-26 12:43 [PATCH 0/4] nova-core: align Bar0/Bar1 and remvove unnecessary Arc Danilo Krummrich
2026-09-26 12:43 ` Danilo Krummrich [this message]
2026-09-28 5:39 ` [PATCH 1/4] gpu: nova-core: align Bar1 alias with Bar0 Eliot Courtney
2026-09-26 12:43 ` [PATCH 2/4] gpu: nova-core: remove unnecessary Arc around BarUser Danilo Krummrich
2026-09-28 5:39 ` Eliot Courtney
2026-09-26 12:43 ` [PATCH 3/4] gpu: nova-core: mm: get rid of Arc<BarUser> in BarUserAccess Danilo Krummrich
2026-09-26 12:58 ` sashiko-bot
2026-09-28 5:40 ` Eliot Courtney
2026-09-26 12:43 ` [PATCH 4/4] gpu: nova-core: mm: fix lifetime name in BarUser Danilo Krummrich
2026-09-28 5:40 ` Eliot Courtney
2026-09-26 15:34 ` [PATCH 0/4] nova-core: align Bar0/Bar1 and remvove unnecessary Arc Alexandre Courbot
2026-09-27 12:15 ` Danilo Krummrich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260926124405.604707-2-dakr@kernel.org \
--to=dakr@kernel.org \
--cc=acourbot@nvidia.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=nova-gpu@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox