android_kernel_xiaomi_sm8350/arch/i386/kernel/cpu
Daniel Drake dc2585eb47 [CPUFREQ] powernow-k7: fix MHz rounding issue with perflib
When the PST tables are broken, powernow-k7 uses ACPI's processor_perflib to
deduce the available frequency multipliers from the _PSS tables.

Upon frequency change, processor_perflib performs some verification on the
frequency (checks that it's within allowable bounds).

powernow-k7 deals with absolute frequencies in KHz, whereas perflib only
deals with MHz values. When performing the above verification, perflib
multiplies the MHz values by 1000 to obtain the KHz value.

We then end up with situations like the following:
 - powernow-k7 multiplies the multiplier by the FSB, and obtains a value
   such as 1266768 KHz
 - perflib belives the same state has frequency of 1266 MHz
 - acpi_processor_ppc_notifier calls cpufreq_verify_within_limits to verify
   that 1266768 is in the allowable range of 0 to 1266000 (i.e. 1266 * 1000)
 - it's not, so that frequency is rejected
 - the maximum CPU frequency is not reachable

This patch solves the problem by rounding up the MHz values stored in perflib's
tables. Additionally it corrects a broken URL.

It also fixes http://bugzilla.kernel.org/show_bug.cgi?id=8255 although this
case is a bit different: the frequencies in the _PSS tables are wildly wrong,
but we get better results if we force ACPI to respect the fsb * multiplier
calculations (even though it seems that the multiplier values aren't entirely
correct either).

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: Dave Jones <davej@redhat.com>
2007-05-13 17:25:13 -04:00
..
cpufreq [CPUFREQ] powernow-k7: fix MHz rounding issue with perflib 2007-05-13 17:25:13 -04:00
mcheck Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2007-05-09 12:54:17 -07:00
mtrr [PATCH] i386: fix mtrr sections 2007-05-02 19:27:18 +02:00
amd.c [PATCH] i386: Don't delete cpu_devs data to identify different x86 types in late_initcall 2007-05-02 19:27:22 +02:00
bugs.c [PATCH] i386: Clean up asm-i386/bugs.h 2007-05-02 19:27:12 +02:00
centaur.c [PATCH] i386: Don't delete cpu_devs data to identify different x86 types in late_initcall 2007-05-02 19:27:22 +02:00
common.c [PATCH] i386: Fix UP gdt bugs 2007-05-02 19:27:16 +02:00
cpu.h
cyrix.c [PATCH] i386: Don't delete cpu_devs data to identify different x86 types in late_initcall 2007-05-02 19:27:22 +02:00
intel_cacheinfo.c Add suspend-related notifications for CPU hotplug 2007-05-09 12:30:56 -07:00
intel.c [PATCH] i386: Implement X86_FEATURE_SYNC_RDTSC on i386 2007-05-02 19:27:20 +02:00
Makefile [PATCH] i386: Clean up NMI watchdog code 2007-05-02 19:27:20 +02:00
nexgen.c [PATCH] i386: Don't delete cpu_devs data to identify different x86 types in late_initcall 2007-05-02 19:27:22 +02:00
perfctr-watchdog.c [PATCH] i386: Clean up NMI watchdog code 2007-05-02 19:27:20 +02:00
proc.c [PATCH] x86: remove constant_tsc reporting from /proc/cpuinfo' power flags 2007-05-02 19:27:09 +02:00
rise.c [PATCH] i386: Don't delete cpu_devs data to identify different x86 types in late_initcall 2007-05-02 19:27:22 +02:00
transmeta.c i386: cpu/transmeta.c: fix definition of USER686 2007-05-09 12:49:33 -07:00
umc.c [PATCH] i386: Don't delete cpu_devs data to identify different x86 types in late_initcall 2007-05-02 19:27:22 +02:00