aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/acpica
diff options
context:
space:
mode:
authorEitan Adler <eadler@FreeBSD.org>2012-10-22 13:06:09 +0000
committerEitan Adler <eadler@FreeBSD.org>2012-10-22 13:06:09 +0000
commita8de37b0244d1101e634922d018579cc3073318f (patch)
tree07e19b18864f030899e170c445daf41bd547c6d1 /sys/dev/acpica
parent7994d24f0c2194c99c01a9f8b3c97b08b4984c46 (diff)
downloadsrc-a8de37b0244d1101e634922d018579cc3073318f.tar.gz
src-a8de37b0244d1101e634922d018579cc3073318f.zip
This isn't functionally identical. In some cases a hint to disable
unit 0 would in fact disable all units. This reverts r241856 Approved by: cperciva (implicit)
Notes
Notes: svn path=/head/; revision=241885
Diffstat (limited to 'sys/dev/acpica')
-rw-r--r--sys/dev/acpica/acpi.c4
-rw-r--r--sys/dev/acpica/acpi_perf.c3
-rw-r--r--sys/dev/acpica/acpi_throttle.c3
3 files changed, 10 insertions, 0 deletions
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
index 5e0466d08eff..cfe08ed1dbfe 100644
--- a/sys/dev/acpica/acpi.c
+++ b/sys/dev/acpica/acpi.c
@@ -377,6 +377,10 @@ acpi_identify(void)
if (!cold)
return (ENXIO);
+ /* Check that we haven't been disabled with a hint. */
+ if (resource_disabled("acpi", 0))
+ return (ENXIO);
+
/* Check for other PM systems. */
if (power_pm_get_type() != POWER_PM_TYPE_NONE &&
power_pm_get_type() != POWER_PM_TYPE_ACPI) {
diff --git a/sys/dev/acpica/acpi_perf.c b/sys/dev/acpica/acpi_perf.c
index e7d697cf39cd..3f047cce6b85 100644
--- a/sys/dev/acpica/acpi_perf.c
+++ b/sys/dev/acpica/acpi_perf.c
@@ -175,6 +175,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 4ac52225296f..40476e02bd98 100644
--- a/sys/dev/acpica/acpi_throttle.c
+++ b/sys/dev/acpica/acpi_throttle.c
@@ -167,6 +167,9 @@ static int
acpi_throttle_probe(device_t dev)
{
+ if (resource_disabled("acpi_throttle", 0))
+ return (ENXIO);
+
/*
* On i386 platforms at least, ACPI throttling is accomplished by
* the chipset modulating the STPCLK# pin based on the duty cycle.