From 7cb8584285d7b23026713439d4c82d55c6d92934 Mon Sep 17 00:00:00 2001 From: njl Date: Tue, 22 Feb 2005 06:31:45 +0000 Subject: Support disabling individual cpufreq drivers with hints, e.g., hint.ichss.0.disabled="1" --- sys/dev/acpica/acpi_perf.c | 3 +++ sys/dev/acpica/acpi_throttle.c | 3 +++ sys/dev/cpufreq/ichss.c | 3 +++ sys/i386/cpufreq/est.c | 3 +++ 4 files changed, 12 insertions(+) (limited to 'sys') diff --git a/sys/dev/acpica/acpi_perf.c b/sys/dev/acpica/acpi_perf.c index 040f2d5..e7d2e8a 100644 --- a/sys/dev/acpica/acpi_perf.c +++ b/sys/dev/acpica/acpi_perf.c @@ -165,6 +165,9 @@ acpi_perf_probe(device_t dev) ACPI_BUFFER buf; int error, rid, type; + if (resource_disabled("acpi_perf", 0)) + return (ENXIO); + /* * Check the performance state registers. If they are of type * "functional fixed hardware", we attach quietly since we will diff --git a/sys/dev/acpica/acpi_throttle.c b/sys/dev/acpica/acpi_throttle.c index 6261eba..b736124 100644 --- a/sys/dev/acpica/acpi_throttle.c +++ b/sys/dev/acpica/acpi_throttle.c @@ -166,6 +166,9 @@ static int acpi_throttle_probe(device_t dev) { + if (resource_disabled("acpi_throttle", 0)) + return (ENXIO); + device_set_desc(dev, "ACPI CPU Throttling"); return (0); } diff --git a/sys/dev/cpufreq/ichss.c b/sys/dev/cpufreq/ichss.c index 1f3194a..b8d3542 100644 --- a/sys/dev/cpufreq/ichss.c +++ b/sys/dev/cpufreq/ichss.c @@ -214,6 +214,9 @@ ichss_probe(device_t dev) device_t est_dev, perf_dev; int error, type; + if (resource_disabled("ichss", 0)) + return (ENXIO); + /* * If the ACPI perf driver has attached and is not just offering * info, let it manage things. Also, if Enhanced SpeedStep is diff --git a/sys/i386/cpufreq/est.c b/sys/i386/cpufreq/est.c index 1ae10ff..d40fa4a 100644 --- a/sys/i386/cpufreq/est.c +++ b/sys/i386/cpufreq/est.c @@ -593,6 +593,9 @@ est_probe(device_t dev) device_t perf_dev; uint64_t msr; int error, type; + + if (resource_disabled("est", 0)) + return (ENXIO); /* * If the ACPI perf driver has attached and is not just offering -- cgit v1.1