- Jun 16, 2011
-
-
Konrad Rzeszutek Wilk authored
This patch augments the pstate transition code to error out (instead of returning 0) when an incorrect pstate is provided. Suggested-by:
Borislav Petkov <bp@alien8.de> CC: andre.przywara@amd.com CC: Mark.Langsdorf@amd.com Signed-off-by:
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by:
Dave Jones <davej@redhat.com>
-
Konrad Rzeszutek Wilk authored
Before this patch if we failed the vid transition would still try to submit the "new" frequencies to cpufreq. That is incorrect - also we could submit a non-existing frequency value which would cause cpufreq to crash. The ultimate fix is in cpufreq to deal with incorrect values, but this patch improves the error recovery in the AMD powernowk8 driver. The failure that was reported was as follows: powernow-k8: Found 1 AMD Athlon(tm) 64 Processor 3700+ (1 cpu cores) (version 2.20.00) powernow-k8: fid 0x2 (1000 MHz), vid 0x12 powernow-k8: fid 0xa (1800 MHz), vid 0xa powernow-k8: fid 0xc (2000 MHz), vid 0x8 powernow-k8: fid 0xe (2200 MHz), vid 0x8 Marking TSC unstable due to cpufreq changes powernow-k8: fid trans failed, fid 0x2, curr 0x0 BUG: unable to handle kernel paging request at ffff880807e07b78 IP: [<ffffffff81479163>] cpufreq_stats_update+0x46/0x5b ... And transition fails and data->currfid ends up with 0. Since the machine does not support 800Mhz value when the calculation is done ('find_khz_freq_from_fid(data->currfid);') it reports the new frequency as 800000 which is bogus. This patch fixes the issue during target setting. The patch however does not fix the issue in 'powernowk8_cpu_init' where the pol->cur can also be set with the 800000 value: pol->cur = find_khz_freq_from_fid(data->currfid); dprintk("policy current frequency %d kHz\n", pol->cur); /* min/max the cpu is capable of */ if (cpufreq_frequency_table_cpuinfo(pol, data->powernow_table)) { The fix for that looks to update cpufreq_frequency_table_cpuinfo to check pol->cur.... but that would cause an regression in how the acpi-cpufreq driver works (it sets cpu->cur after calling cpufreq_frequency_table_cpuinfo). Instead the fix will be to let cpufreq gracefully handle bogus data (another patch). Acked-by:
Borislav Petkov <bp@alien8.de> CC: andre.przywara@amd.com CC: Mark.Langsdorf@amd.com Reported-by:
Tobias Diedrich <ranma+xen@tdiedrich.de> Tested-by:
Tobias Diedrich <ranma+xen@tdiedrich.de> [v1: Rebased on v3.0-rc2, reduced patch to deal with vid case] Signed-off-by:
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by:
Dave Jones <davej@redhat.com>
-
- May 19, 2011
-
-
Dave Jones authored
Signed-off-by:
Dave Jones <davej@redhat.com>
-
- May 04, 2011
-
-
Dominik Brodowski authored
With dynamic debug having gained the capability to report debug messages also during the boot process, it offers a far superior interface for debug messages than the custom cpufreq infrastructure. As a first step, remove the old cpufreq_debug_printk() function and replace it with a call to the generic pr_debug() function. How can dynamic debug be used on cpufreq? You need a kernel which has CONFIG_DYNAMIC_DEBUG enabled. To enabled debugging during runtime, mount debugfs and $ echo -n 'module cpufreq +p' > /sys/kernel/debug/dynamic_debug/control for debugging the complete "cpufreq" module. To achieve the same goal during boot, append ddebug_query="module cpufreq +p" as a boot parameter to the kernel of your choice. For more detailled instructions, please see Documentation/dynamic-debug-howto.txt Signed-off-by:
Dominik Brodowski <linux@dominikbrodowski.net> Signed-off-by:
Dave Jones <davej@redhat.com>
-
- Mar 18, 2011
-
-
Lucas De Marchi authored
They were generated by 'codespell' and then manually reviewed. Signed-off-by:
Lucas De Marchi <lucas.demarchi@profusion.mobi> Cc: trivial@kernel.org LKML-Reference: <1300389856-1099-3-git-send-email-lucas.demarchi@profusion.mobi> Signed-off-by:
Ingo Molnar <mingo@elte.hu>
-
- Mar 16, 2011
-
-
Thomas Renninger authored
and it also is misleading due to another message above which makes the index look like it is the CPU. https://bugzilla.kernel.org/show_bug.cgi?id=24562 Signed-off-by:
Thomas Renninger <trenn@suse.de> Signed-off-by:
Dave Jones <davej@redhat.com> CC: cpufreq@vger.kernel.org
-
- Mar 01, 2011
-
-
Dave Jones authored
Do the notifier registration later, so we don't have to worry about freeing it if we fail the msr allocation. Signed-off-by:
Dave Jones <davej@redhat.com>
-
Neil Brown authored
It appears that when powernow-k8 finds that No compatible ACPI _PSS objects found. and suggests Try again with latest BIOS. it fails the module load, but does not unregister the cpu_notifier that was registered in powernowk8_init This ends up leaving freed memory on the cpu notifier list for some other poor module (e.g. md/raid5) to come along and trip over. The following might be a partial fix, but I suspect there is probably other clean-up that is needed. ( https://bugzilla.novell.com/show_bug.cgi?id=655215 has full dmesg traces). Signed-off-by:
Dave Jones <davej@redhat.com> Signed-off-by:
Neil Brown <neilb@suse.de>
-
- Dec 30, 2010
-
-
Tejun Heo authored
Replace all uses of current_cpu_data with this_cpu operations on the per cpu structure cpu_info. The scala accesses are replaced with the matching this_cpu ops which results in smaller and more efficient code. In the long run, it might be a good idea to remove cpu_data() macro too and use per_cpu macro directly. tj: updated description Cc: Yinghai Lu <yinghai@kernel.org> Cc: Ingo Molnar <mingo@elte.hu> Acked-by:
H. Peter Anvin <hpa@zytor.com> Acked-by:
Tejun Heo <tj@kernel.org> Signed-off-by:
Christoph Lameter <cl@linux.com> Signed-off-by:
Tejun Heo <tj@kernel.org>
-
Tejun Heo authored
Go through x86 code and replace __get_cpu_var and get_cpu_var instances that refer to a scalar and are not used for address determinations. Cc: Yinghai Lu <yinghai@kernel.org> Cc: Ingo Molnar <mingo@elte.hu> Acked-by:
Tejun Heo <tj@kernel.org> Acked-by:
"H. Peter Anvin" <hpa@zytor.com> Signed-off-by:
Christoph Lameter <cl@linux.com> Signed-off-by:
Tejun Heo <tj@kernel.org>
-
- Aug 03, 2010
-
-
Borislav Petkov authored
rdmsr() takes the lower 32 bits as a second argument and the high 32 as a third. Fix the names accordingly since they were swapped. There should be no functionality change resulting from this patch. Signed-off-by:
Borislav Petkov <borislav.petkov@amd.com> Signed-off-by:
Dave Jones <davej@redhat.com>
-
Marti Raudsepp authored
On Wed, 2010-01-20 at 16:56 +0100, Thomas Renninger wrote: > But most often this happens if people upgrade their CPU and do not > update their BIOS. > Or the vendor does not recognise the new CPU even if the BIOS got > updated. Maybe some of those people just didn't realize it was disabled in BIOS? If you tell users that it's a firmware bug then they'll probably just give up. > The itself message might be an enhancment, IMO it's not worth a patch. Why do you think so? I spent an hour on hunting down the BIOS upgrade, only to find that it didn't improve anything. It was a day later that I realized that it might be a BIOS option; and the option was literally the _last_ option in the whole BIOS setup. :) This message would have saved the day. > But do not revert the FW_BUG part! Sure, you have a point here. How about this patch?
-
Borislav Petkov authored
The Pstate transition latency check was added for broken F10h BIOSen which wrongly contain a value of 0 for transition and bus master latency. Fam11h and later, however, (will) have similar transition latency so extend that behavior for them too. Signed-off-by:
Borislav Petkov <borislav.petkov@amd.com> Signed-off-by:
Dave Jones <davej@redhat.com>
-
- Jul 26, 2010
-
-
Borislav Petkov authored
The Pstate transition latency check was added for broken F10h BIOSen which wrongly contain a value of 0 for transition and bus master latency. Fam11h and later, however, (will) have similar transition latency so extend that behavior for them too. Signed-off-by:
Borislav Petkov <borislav.petkov@amd.com> Signed-off-by:
Dave Jones <davej@redhat.com>
-
- Jul 19, 2010
-
-
Pavel Machek authored
pavel@suse.cz no longer works, replace it with working address. Signed-off-by:
Pavel Machek <pavel@ucw.cz> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
- May 25, 2010
-
-
Borislav Petkov authored
Fix the following warning: "WARNING: arch/x86/kernel/built-in.o(.exit.text+0x72): Section mismatch in reference from the function powernowk8_exit() to the variable .cpuinit.data:cpb_nb The function __exit powernowk8_exit() references a variable __cpuinitdata cpb_nb. This is often seen when error handling in the exit function uses functionality in the init path. The fix is often to remove the __cpuinitdata annotation of cpb_nb so it may be used outside an init section." Cc: <stable@kernel.org> Reported-by:
H. Peter Anvin <hpa@zytor.com> Signed-off-by:
Borislav Petkov <borislav.petkov@amd.com> LKML-Reference: <20100525152858.GA24836@aftab> Signed-off-by:
H. Peter Anvin <hpa@linux.intel.com>
-
- May 03, 2010
-
-
Mark Langsdorf authored
With F10, model 10, all valid frequencies are in the ACPI _PST table. Cc: <stable@kernel.org> # 33.x 32.x Signed-off-by:
Mark Langsdorf <mark.langsdorf@amd.com> LKML-Reference: <1270065406-1814-6-git-send-email-bp@amd64.org> Signed-off-by:
Borislav Petkov <borislav.petkov@amd.com> Reviewed-by:
Thomas Renninger <trenn@suse.de> Signed-off-by:
H. Peter Anvin <hpa@zytor.com> Signed-off-by:
Ingo Molnar <mingo@elte.hu>
-
- Apr 09, 2010
-
-
Mark Langsdorf authored
With F10, model 10, all valid frequencies are in the ACPI _PST table. Cc: <stable@kernel.org> # 33.x 32.x Signed-off-by:
Mark Langsdorf <mark.langsdorf@amd.com> LKML-Reference: <1270065406-1814-6-git-send-email-bp@amd64.org> Signed-off-by:
Borislav Petkov <borislav.petkov@amd.com> Reviewed-by:
Thomas Renninger <trenn@suse.de> Signed-off-by:
H. Peter Anvin <hpa@zytor.com>
-
Mark Langsdorf authored
Starting with model 10 of Family 0x10, AMD processors may have support for APERF/MPERF. Add support for identifying it and using it within cpufreq. Move the APERF/MPERF functions out of the acpi-cpufreq code and into their own file so they can easily be shared. Signed-off-by:
Mark Langsdorf <mark.langsdorf@amd.com> LKML-Reference: <20100401141956.GA1930@aftab> Signed-off-by:
Borislav Petkov <borislav.petkov@amd.com> Reviewed-by:
Thomas Renninger <trenn@suse.de> Signed-off-by:
H. Peter Anvin <hpa@zytor.com>
-
Borislav Petkov authored
Starting with F10h, revE, AMD processors add support for a dynamic core boosting feature called Core Performance Boost. When a specific condition is present, a subset of the cores on a system are boosted beyond their P0 operating frequency to speed up the performance of single-threaded applications. In the normal case, the system comes out of reset with core boosting enabled. This patch adds a sysfs knob with which core boosting can be switched on or off for benchmarking purposes. While at it, make the CPB code hotplug-aware so that taking cores offline wouldn't interfere with boosting the remaining online cores. Furthermore, add cpu_online_mask hotplug protection as suggested by Andrew. Finally, cleanup the driver init codepath and update copyrights. Signed-off-by:
Borislav Petkov <borislav.petkov@amd.com> LKML-Reference: <1270065406-1814-3-git-send-email-bp@amd64.org> Reviewed-by:
Thomas Renninger <trenn@suse.de> Signed-off-by:
H. Peter Anvin <hpa@zytor.com>
-
- Jan 27, 2010
-
-
Lin Ming authored
acpi_integer is now obsolete and removed from the ACPICA code base, replaced by u64. Signed-off-by:
Lin Ming <ming.m.lin@intel.com> Signed-off-by:
Len Brown <len.brown@intel.com>
-
- Jan 13, 2010
-
-
Thomas Renninger authored
Easy fix for a regression introduced in 2.6.31. On managed CPUs the cpufreq.c core will call driver->exit(cpu) on the managed cpus and powernow_k8 will free the core's data. Later driver->get(cpu) function might get called trying to read out the current freq of a managed cpu and the NULL pointer check does not work on the freed object -> better set it to NULL. ->get() is unsigned and must return 0 as invalid frequency. Reference: http://bugzilla.kernel.org/show_bug.cgi?id=14391 Signed-off-by:
Thomas Renninger <trenn@suse.de> Tested-by:
Michal Schmidt <mschmidt@redhat.com> CC: stable@kernel.org Signed-off-by:
Dave Jones <davej@redhat.com>
-
- Dec 16, 2009
-
-
Rusty Russell authored
Noone uses this wrapper yet, and Ingo asked that it be kept consistent with current task_struct usage. (One user crept in via linux-next: fixed) Signed-off-by:
Rusty Russell <rusty@rustcorp.com.au.> Cc: Ingo Molnar <mingo@elte.hu> Cc: Tejun Heo <tj@kernel.org>
-
- Nov 24, 2009
-
-
Thomas Renninger authored
This interface is mainly intended (and implemented) for ACPI _PPC BIOS frequency limitations, but other cpufreq drivers can also use it for similar use-cases. Why is this needed: Currently it's not obvious why cpufreq got limited. People see cpufreq/scaling_max_freq reduced, but this could have happened by: - any userspace prog writing to scaling_max_freq - thermal limitations - hardware (_PPC in ACPI case) limitiations Therefore export bios_limit (in kHz) to: - Point the user that it's the BIOS (broken or intended) which limits frequency - Export it as a sysfs interface for userspace progs. While this was a rarely used feature on laptops, there will appear more and more server implemenations providing "Green IT" features like allowing the service processor to limit the frequency. People want to know about HW/BIOS frequency limitations. All ACPI P-state driven cpufreq drivers are covered with this patch: - powernow-k8 - powernow-k7 - acpi-cpufreq Tested with a patched DSDT which limits the first two cores (_PPC returns 1) via _PPC, exposed by bios_limit: # echo 2200000 >cpu2/cpufreq/scaling_max_freq # cat cpu*/cpufreq/scaling_max_freq 2600000 2600000 2200000 2200000 # #scaling_max_freq shows general user/thermal/BIOS limitations # cat cpu*/cpufreq/bios_limit 2600000 2600000 2800000 2800000 # #bios_limit only shows the HW/BIOS limitation CC: Pallipadi Venkatesh <venkatesh.pallipadi@intel.com> CC: Len Brown <lenb@kernel.org> CC: davej@codemonkey.org.uk CC: linux@dominikbrodowski.net Signed-off-by:
Thomas Renninger <trenn@suse.de> Signed-off-by:
Dave Jones <davej@redhat.com>
-
Rusty Russell authored
It's still mugging the current process's cpumask, but as comment in 1ff6e97f says, it's not a trivial fix. So, at least we can use a cpumask_var_t to do the Wrong Thing the Right Way :) Signed-off-by:
Rusty Russell <rusty@rustcorp.com.au> To: cpufreq@vger.kernel.org Cc: Mark Langsdorf <mark.langsdorf@amd.com> Signed-off-by:
Dave Jones <davej@redhat.com>
-
- Nov 17, 2009
-
-
Roel Kluin authored
Not makes it a bool before the comparison. Signed-off-by:
Roel Kluin <roel.kluin@gmail.com> Signed-off-by:
Dave Jones <davej@redhat.com>
-
- Sep 16, 2009
-
-
Kurt Roeckx authored
Fixes bugzilla #13780 From: Kurt Roeckx <kurt@roeckx.be> Signed-off-by:
Dave Jones <davej@redhat.com>
-
- Sep 01, 2009
-
-
Mark Langsdorf authored
Remove an obsolete check that used to prevent there being more than 2 low P-states. Now that low-to-low P-states changes are enabled, it prevents otherwise workable configurations with multiple low P-states. Signed-off-by:
Mark Langsdorf <mark.langsdorf@amd.com> Tested-by:
Krists Krilovs <pow@pow.za.net> Signed-off-by:
Dave Jones <davej@redhat.com>
-
- Jul 08, 2009
-
-
Joe Perches authored
Commit 5fd29d6c ("printk: clean up handling of log-levels and newlines") changed printk semantics. printk lines with multiple KERN_<level> prefixes are no longer emitted as before the patch. <level> is now included in the output on each additional use. Remove all uses of multiple KERN_<level>s in formats. Signed-off-by:
Joe Perches <joe@perches.com> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- Jul 06, 2009
-
-
Mark Langsdorf authored
Provide support for family 0xf processors with 2 P-states below the elevator voltage. Remove the checks that prevent this configuration from being supported and increase the transition voltage to prevent errors during the transition. Signed-off-by:
Mark Langsdorf <mark.langsdorf@amd.com> Signed-off-by:
Dave Jones <davej@redhat.com>
-
- Jun 15, 2009
-
-
Rusty Russell authored
Remove all old-style cpumask operators, and cpumask_t. Also: get rid of the unused define_siblings function. Signed-off-by:
Rusty Russell <rusty@rustcorp.com.au> Acked-by:
Mark Langsdorf <mark.langsdorf@amd.com> Tested-by:
Mark Langsdorf <mark.langsdorf@amd.com> Signed-off-by:
Dave Jones <davej@redhat.com>
-
Rusty Russell authored
cpumask: avoid playing with cpus_allowed in powernow-k8.c It's generally a very bad idea to mug some process's cpumask: it could legitimately and reasonably be changed by root, which could break us (if done before our code) or them (if we restore the wrong value). I did not replace powernowk8_target; it needs fixing, but it grabs a mutex (so no smp_call_function_single here) but Mark points out it can be called multiple times per second, so work_on_cpu is too heavy. Signed-off-by:
Rusty Russell <rusty@rustcorp.com.au> To: cpufreq@vger.kernel.org Acked-by:
Mark Langsdorf <mark.langsdorf@amd.com> Tested-by:
Mark Langsdorf <mark.langsdorf@amd.com> Signed-off-by:
Dave Jones <davej@redhat.com>
-
Naga Chumbalkar authored
Make powernowk8_get() similar to powernowk8_target() and powernowk8_verify() in the way it obtains "powernow_data" for a given CPU. Cc: Andreas Herrmann <andreas.herrmann3@amd.com> Cc: Langsdorf, Mark <mark.langsdorf@amd.com> Cc: Thomas Renninger <trenn@suse.de> Signed-off-by:
Naga Chumbalkar <nagananda.chumbalkar@hp.com> Reviewed-by:
Andreas Herrmann <andreas.herrmann3@amd.com> Tested-by:
Andreas Herrmann <andreas.herrmann3@amd.com> Acked-by:
Langsdorf, Mark <mark.langsdorf@amd.com> Signed-off-by:
Thomas Renninger <trenn@suse.de> Signed-off-by:
Dave Jones <davej@redhat.com>
-
Naga Chumbalkar authored
By definition, "cpuinfo_cur_freq" should report the value from HW. So, don't depend on the cached value. Instead read P-state directly from HW, while taking into account the erratum 311 workaround for Fam 11h processors. Cc: Andreas Herrmann <andreas.herrmann3@amd.com> Cc: Langsdorf, Mark <mark.langsdorf@amd.com> Cc: Thomas Renninger <trenn@suse.de> Signed-off-by:
Naga Chumbalkar <nagananda.chumbalkar@hp.com> Reviewed-by:
Andreas Herrmann <andreas.herrmann3@amd.com> Tested-by:
Andreas Herrmann <andreas.herrmann3@amd.com> Acked-by:
Langsdorf, Mark <mark.langsdorf@amd.com> Signed-off-by:
Thomas Renninger <trenn@suse.de> Signed-off-by:
Dave Jones <davej@redhat.com>
-
Andrew Morton authored
This symbol doesn't need file-global scope. Cc: "Zhang, Rui" <rui.zhang@intel.com> Cc: Dave Jones <davej@codemonkey.org.uk> Cc: Ingo Molnar <mingo@elte.hu> Cc: Langsdorf, Mark <mark.langsdorf@amd.com> Cc: Leo Milano <lmilano@gmx.net> Cc: Thomas Renninger <trenn@suse.de> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Dave Jones <davej@redhat.com>
-
Luis Henriques authored
Mess cleanup in powernow_k8_acpi_pst_values() function. Signed-off-by:
Luis Henriques <henrix@sapo.pt> Signed-off-by:
Dave Jones <davej@redhat.com>
-
Thomas Renninger authored
This doesn't fix anything, but it's expected that a transition latency of 0 could cause trouble in the future. Signed-off-by:
Thomas Renninger <trenn@suse.de> Cc: Langsdorf, Mark <mark.langsdorf@amd.com> Signed-off-by:
Dave Jones <davej@redhat.com>
-
- Jun 09, 2009
-
-
Yinghai Lu authored
These are defined as static cpumask_var_t so if MAXSMP is not used, they are cleared already. Avoid surprises when MAXSMP is enabled. Signed-off-by:
Yinghai Lu <yinghai.lu@kernel.org> Signed-off-by:
Rusty Russell <rusty@rustcorp.com.au>
-
- Jun 05, 2009
-
-
Dave Jones authored
The powernow-k8 driver checks to see that the Performance Control/Status Registers are declared as FFH (functional fixed hardware) by the BIOS. However, this check got broken in the commit: 0e64a0c9 [CPUFREQ] checkpatch cleanups for powernow-k8 Fix based on an original patch from Naga Chumbalkar. Signed-off-by:
Naga Chumbalkar <nagananda.chumbalkar@hp.com> Cc: Mark Langsdorf <mark.langsdorf@amd.com> Signed-off-by:
Dave Jones <davej@redhat.com>
-
- May 26, 2009
-
-
Andreas Herrmann authored
Slightly modified by trenn@suse.de -> only do this on fam 10h and fam 11h. Currently powernow-k8 determines CPU frequency from ACPI PSS objects, but according to AMD family 11h BKDG this frequency is just a rounded value: "CoreFreq (MHz) = The CPU COF specified by MSRC001_00[6B:64][CpuFid] rounded to the nearest 100 Mhz." As a consequnce powernow-k8 reports wrong CPU frequency on some systems, e.g. on Turion X2 Ultra: powernow-k8: Found 1 AMD Turion(tm)X2 Ultra DualCore Mobile ZM-82 processors (2 cpu cores) (version 2.20.00) powernow-k8: 0 : pstate 0 (2200 MHz) powernow-k8: 1 : pstate 1 (1100 MHz) powernow-k8: 2 : pstate 2 (600 MHz) But this is wrong as frequency for Pstate2 is 550 MHz. x86info reports it correctly: #x86info -a |grep Pstate ... Pstate-0: fid=e, did=0, vid=24 (2200MHz) Pstate-1: fid=e, did=1, vid=30 (1100MHz) Pstate-2: fid=e, did=2, vid=3c (550MHz) (current) Solution is to determine the frequency directly from Pstate MSRs instead of using rounded values from ACPI table. Signed-off-by:
Andreas Herrmann <andreas.herrmann3@amd.com> Signed-off-by:
Thomas Renninger <trenn@suse.de> Signed-off-by:
Dave Jones <davej@redhat.com>
-