]> git.karo-electronics.de Git - karo-tx-linux.git/commit
powernow-k8: Fix indexing issue
authorAndreas Herrmann <andreas.herrmann3@amd.com>
Fri, 6 Jan 2012 14:57:55 +0000 (15:57 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Feb 2012 19:17:04 +0000 (11:17 -0800)
commit8f44619e1e633884c5f0bfcf6ae05d7b0304cca3
tree1629c45babfba71875df5641dbf839f66bdbe02e
parentaf2ff521425c83a3043af8a600b62d32443031dd
powernow-k8: Fix indexing issue

commit a8eb28480e9b637cc78b9aa5e08612ba97e1317a upstream.

The driver uses the pstate number from the status register as index in
its table of ACPI pstates (powernow_table). This is wrong as this is
not a 1-to-1 mapping.

For example we can have _PSS information to just utilize Pstate 0 and
Pstate 4, ie.

  powernow-k8: Core Performance Boosting: on.
  powernow-k8:    0 : pstate 0 (2200 MHz)
  powernow-k8:    1 : pstate 4 (1400 MHz)

In this example the driver's powernow_table has just 2 entries. Using
the pstate number (4) as index into this table is just plain wrong.

Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/cpufreq/powernow-k8.c