diff options
author | msmith <msmith@FreeBSD.org> | 2002-01-02 10:53:10 +0000 |
---|---|---|
committer | msmith <msmith@FreeBSD.org> | 2002-01-02 10:53:10 +0000 |
commit | aa1c1654e02a5749efcc45a9a47ebc481f55f6f1 (patch) | |
tree | b14131eeb5b37a930919565e6d182c65d5d2e96c /sys/dev/acpica | |
parent | fb48ea88e782a8c66816d731021595f4b2072791 (diff) | |
download | FreeBSD-src-aa1c1654e02a5749efcc45a9a47ebc481f55f6f1.zip FreeBSD-src-aa1c1654e02a5749efcc45a9a47ebc481f55f6f1.tar.gz |
If the CLK_VAL register is 0 bits wide, the system does not support
CPU throttling, so don't do some bogus math to check it.
Diffstat (limited to 'sys/dev/acpica')
-rw-r--r-- | sys/dev/acpica/acpi_cpu.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/sys/dev/acpica/acpi_cpu.c b/sys/dev/acpica/acpi_cpu.c index 887a97c..51e9768 100644 --- a/sys/dev/acpica/acpi_cpu.c +++ b/sys/dev/acpica/acpi_cpu.c @@ -161,16 +161,18 @@ acpi_cpu_attach(device_t dev) cpu_pstate_cnt = AcpiGbl_FADT->PstateCnt; /* validate the offset/width */ - duty_end = cpu_duty_offset + cpu_duty_width - 1; - /* check that it fits */ - if (duty_end > 31) { - printf("acpi_cpu: CLK_VAL field overflows P_CNT register\n"); - cpu_duty_width = 0; - } - /* check for overlap with the THT_EN bit */ - if ((cpu_duty_offset <= 4) && (duty_end >= 4)) { - printf("acpi_cpu: CLK_VAL field overlaps THT_EN bit\n"); - cpu_duty_width = 0; + if (cpu_duty_width > 0) { + duty_end = cpu_duty_offset + cpu_duty_width - 1; + /* check that it fits */ + if (duty_end > 31) { + printf("acpi_cpu: CLK_VAL field overflows P_CNT register\n"); + cpu_duty_width = 0; + } + /* check for overlap with the THT_EN bit */ + if ((cpu_duty_offset <= 4) && (duty_end >= 4)) { + printf("acpi_cpu: CLK_VAL field overlaps THT_EN bit\n"); + cpu_duty_width = 0; + } } /* |