HomeFreeBSD

pci_host_generic: stop address translation in bus_alloc_resource

Description

pci_host_generic: stop address translation in bus_alloc_resource

Translating the provided range prior to rman_reserve_resource(9) is
decidedly wrong; the caller may be trying to do a wildcard allocation,
for which the implementation is expected to DTRT and clamp the range to
what's actually feasible.

We don't use the resulting translation here anyways, so just remove it
entirely -- the rman in the default implementation is derived from
sc->ranges, so the translation should trivially succeed every time as
long as the reservation succeeded. If something has gone awry in a
derived driver, we'll detect it when we translate prior to activation,
so there's likely no diagnostic value in retaining the translation after
reservation either.

Reviewed by: andrew
Noticed by: jhb
Differential Revision: https://reviews.freebsd.org/D36618

Details

Provenance
kevansAuthored on Sep 26 2022, 7:24 PM
Reviewer
andrew
Differential Revision
D36618: pci_host_generic: stop address translation in bus_alloc_resource
Parents
rG818cae0ff752: kasan: provide bus peek/poke definitions
Branches
Unknown
Tags
Unknown