mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Fix the check for acpi_perf(4) so that we verify if it is fully attached
or just offering info. In the former case, we don't probe/attach to allow the ACPI driver precedence. A refinement of this would be to actually use the info provided by acpi_perf(4) to get the real CPU clock rates instead of estimating them but since all systems that support both acpi_perf(4) and ichss(4) export the control registers to acpi_perf(4), it can just handle the registers on its own.
This commit is contained in:
parent
eab1708c9e
commit
6655857ec7
1 changed files with 14 additions and 4 deletions
|
|
@ -209,12 +209,22 @@ ichss_pci_probe(device_t dev)
|
|||
static int
|
||||
ichss_probe(device_t dev)
|
||||
{
|
||||
struct cf_setting set;
|
||||
device_t perf_dev;
|
||||
int count, type;
|
||||
|
||||
/* If the ACPI perf driver has attached, let it manage things. */
|
||||
perf_dev = devclass_get_device(devclass_find("acpi_perf"), 0);
|
||||
if (perf_dev && device_is_attached(perf_dev))
|
||||
return (ENXIO);
|
||||
/*
|
||||
* If the ACPI perf driver has attached and is not just offering
|
||||
* info, let it manage things.
|
||||
*/
|
||||
perf_dev = device_find_child(device_get_parent(dev), "acpi_perf", -1);
|
||||
if (perf_dev && device_is_attached(perf_dev)) {
|
||||
type = 0;
|
||||
count = 1;
|
||||
CPUFREQ_DRV_SETTINGS(perf_dev, &set, &count, &type);
|
||||
if ((type & CPUFREQ_FLAG_INFO_ONLY) == 0)
|
||||
return (ENXIO);
|
||||
}
|
||||
|
||||
device_set_desc(dev, "SpeedStep ICH");
|
||||
return (-1000);
|
||||
|
|
|
|||
Loading…
Reference in a new issue