Re: [PATCH 0/4] drm/tyr: use pin-init self-referential support
From: Danilo Krummrich
Date: Mon Nov 30 2026 - 18:15:17 EST
On Wed Nov 25, 2026 at 12:03 AM CET, Daniel Almeida wrote:
> You're saying this is possible under the code you're proposing? Because at
> first glance this looks like a shortening of 'iomem to 'a (from
> DriverFile<'a>), which I assume the compiler would reject due to invariance?
Yes. A user VM can borrow &'a Mmu<'iomem>. The lifetime 'a bounds the borrow,
while the invariant 'iomem stays unchanged. That's why Vm has separate borrow
and resource lifetime parameters. The invariant parameter can e.g. be hidden
existentially in the file-private data (or an abstraction for a collection of
data associated with handles created by ioctls), as it is in Firmware.