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

(cherry picked from commit bd93b5f79ab489fb0ed6ab25d6be48242eb8c028)

Details

Provenance
kevansAuthored on Sep 26 2022, 7:24 PM
Parents
rG69474c060d7c: Use DEFINE_CLASS_0 in the arm generic timer
Branches
Unknown
Tags
Unknown