Page MenuHomeFreeBSD

pci_host_generic: stop address translation in bus_alloc_resource
ClosedPublic

Authored by kevans on Sep 18 2022, 6:14 AM.
Tags
None
Referenced Files
F102537423: D36618.diff
Wed, Nov 13, 6:28 PM
Unknown Object (File)
Mon, Nov 11, 7:40 PM
Unknown Object (File)
Mon, Nov 11, 6:31 PM
Unknown Object (File)
Mon, Nov 11, 6:04 PM
Unknown Object (File)
Oct 14 2024, 6:16 PM
Unknown Object (File)
Sep 19 2024, 3:17 PM
Unknown Object (File)
Sep 15 2024, 3:00 PM
Unknown Object (File)
Sep 8 2024, 11:16 PM

Details

Summary

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.

Noticed by: jhb

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable