svn commit: r346999 - in stable: 11/sys/dev/acpica 12/sys/dev/acpica
John Baldwin
jhb at FreeBSD.org
Wed May 1 17:30:15 UTC 2019
Author: jhb
Date: Wed May 1 17:30:14 2019
New Revision: 346999
URL: https://svnweb.freebsd.org/changeset/base/346999
Log:
MFC 346063: Don't pre-reserve resources for CPU devices when they are set.
CPUs can use shared (RF_SHAREABLE) resources for the I/O port used for
entering and exiting C states. If this I/O port is included in an ACPI
system resource device, then this happens to still work, but if the port
wasn't part of a system resource device, only the first CPU could allocate
the I/O port and use C states since resource_list_reserve() was always
allocating the resource from nexus0 without RF_SHAREABLE. By avoiding
the reservation, the flags from the bus_alloc_resource() in the CPU driver
(which include RF_SHAREABLE) are honored.
PR: 236513
Modified:
stable/12/sys/dev/acpica/acpi.c
Directory Properties:
stable/12/ (props changed)
Changes in other areas also in this revision:
Modified:
stable/11/sys/dev/acpica/acpi.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/12/sys/dev/acpica/acpi.c
==============================================================================
--- stable/12/sys/dev/acpica/acpi.c Wed May 1 17:27:04 2019 (r346998)
+++ stable/12/sys/dev/acpica/acpi.c Wed May 1 17:30:14 2019 (r346999)
@@ -1347,6 +1347,14 @@ acpi_set_resource(device_t dev, device_t child, int ty
return (0);
/*
+ * Don't reserve resources for CPU devices. Some of these
+ * resources need to be allocated as shareable, but reservations
+ * are always non-shareable.
+ */
+ if (device_get_devclass(child) == devclass_find("cpu"))
+ return (0);
+
+ /*
* Reserve the resource.
*
* XXX: Ignores failure for now. Failure here is probably a
More information about the svn-src-all
mailing list