HomeFreeBSD

acpi: Only reserve resources enumerated via _CRS

Description

acpi: Only reserve resources enumerated via _CRS

In particular, don't reserve resources added by drivers via other
means (e.g. acpi_bus_alloc_gas which calls bus_alloc_resource
right after adding the resource).

The intention of reserved resources is to ensure that a resource range
that a bus driver knows is assigned to a device is reserved by the
system even if no driver is attached to the device. This prevents
other "wildcard" resource requests from conflicting with these
resources. For ACPI, the only resources the bus driver knows about
for unattached devices are the resources returned from _CRS. All of
these resources are already reserved now via acpi_reserve_resources
called from acpi_probe_children.

As such, remove the logic from acpi_set_resource to try to reserve
resources when they are set. This permits RF_SHAREABLE to work with
acpi_bus_alloc_gas without requiring hacks like the current one for
CPU device resources in acpi_set_resource.

Reported by: gallatin (RF_SHAREABLE not working)
Diagnosed by: jrtc27

(cherry picked from commit c6a488511ab1fbae8d16264b9e83c85024c9e1ce)

Details

Provenance
jhbAuthored on Jan 9 2024, 7:23 PM
Parents
rGcad6775d969e: kldxref: Workaround incorrect PT_DYNAMIC in existing powerpc kernels
Branches
Unknown
Tags
Unknown