]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ACPI idle: permit sparse C-state sub-state numbers
authorLen Brown <len.brown@intel.com>
Fri, 14 Feb 2014 06:14:13 +0000 (01:14 -0500)
committerJiri Slaby <jslaby@suse.cz>
Mon, 16 Feb 2015 14:01:51 +0000 (15:01 +0100)
commit414a72c0854c450ceff6d82ce3267ae328b32707
tree30147e4be5adc5193bb8b80037fed36cc09bd838
parentb116a0436c29bd83196d1988d75521044dc36e5d
ACPI idle: permit sparse C-state sub-state numbers

commit 2194324d8bbbad1b179c08b6095649b06abd62d5 upstream.

Linux uses CPUID.MWAIT.EDX to validate the C-states
reported by ACPI, silently discarding states which
are not supported by the HW.

This test is too restrictive, as some HW now uses
sparse sub-state numbering, so the sub-state number
may be higher than the number of sub-states...

Also, rather than silently ignoring an invalid state,
we should complain about a firmware bug.

In practice...

Bay Trail systems originally supported C6-no-shrink as
MWAIT sub-state 0x58, and in CPUID.MWAIT.EDX 0x03000000
indicated that there were 3 MWAIT-C6 sub-states.
So acpi_idle would discard that C-state because 8 >= 3.

Upon discovering this issue, the ucode was updated so that
C6-no-shrink was also exported as 0x51, and the BIOS was
updated to match.  However, systems shipped with 0x58,
will never get a BIOS update, and this patch allows
Linux to see C6-no-shrink on early Bay Trail.

Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
arch/x86/kernel/acpi/cstate.c