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
Unknown Object (File)
Mon, Dec 9, 7:20 PM
Unknown Object (File)
Sat, Dec 7, 9:24 PM
Unknown Object (File)
Wed, Dec 4, 7:48 AM
Unknown Object (File)
Wed, Nov 27, 1:27 PM
Unknown Object (File)
Wed, Nov 27, 6:08 AM
Unknown Object (File)
Sun, Nov 24, 9:33 AM
Unknown Object (File)
Sat, Nov 23, 1:46 PM
Unknown Object (File)
Thu, Nov 21, 7:09 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