summaryrefslogtreecommitdiff
path: root/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
AgeCommit message (Collapse)Author
2007-10-11i386: move kernel/cpu/cpufreqThomas Gleixner
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-08-07acpi-cpufreq: Fix some x86/x86-64 acpi-cpufreq driver issuesFenghua Yu
This patch addresses some issues in x86/x86-64 acpi-cpufreq driver: 1. Current memory allocation for acpi_perf_data is actually open-coded alloc_percpu(). The patch defines and handles acpi_perf_data as percpu data. The code will be cleaner and easier to be maintained with this change. 2. Won't load driver in acpi_cpufreq_early_init() failure case. 3. Add __init for acpi_cpufreq_early_init(). Signed-off-by: Fenghua Yu <fenghua.yu@intel.com> Acked-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Cc: Dave Jones <davej@codemonkey.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-31Fix uninitialized local variable "covered" in i386 acpi-cpufreq driverFenghua Yu
The local variable "covered" is used without initialization in i386 acpi-cpufreq driver. The initial value of covered should be 0. The bug will cause memory leak when hit. The following patch fixes this bug. Signed-off-by: Fenghua Yu <fenghua.yu@intel.com> Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-22Pull bugzilla-7880 into release branchLen Brown
2007-06-13ACPI: Discard invalid elements in _PSS packageZhang Rui
Make sure that the _PSS list is sorted in descending order by typical power dissipation. http://bugzilla.kernel.org/show_bug.cgi?id=7880 Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2007-05-29[CPUFREQ] acpi-cpufreq: Proper ReadModifyWrite of PERF_CTL MSRVenki Pallipadi
During recent acpi-cpufreq changes, writing to PERF_CTL msr changed from RMW of entire 64 bit to RMW of low 32 bit and clearing of upper 32 bit. Fix it back to do a proper RMW of the MSR. Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Dave Jones <davej@redhat.com>
2007-01-02[CPUFREQ] Uninitialized use of cmd.val in ↵Guillaume Chazarain
arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c:acpi_cpufreq_target() cmd.val was used uninitialized on the line below. Signed-off-by: Guillaume Chazarain <guichaz@yahoo.fr> Acked-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Dave Jones <davej@redhat.com>
2006-12-22[CPUFREQ] Bug fix for acpi-cpufreq and cpufreq_stats oops on frequency ↵Venkatesh Pallipadi
change notification Fixes the oops in cpufreq_stats with acpi_cpufreq driver. The issue was that the frequency was reported as 0 in acpi-cpufreq.c. The bug is due to different indicies for freq_table and ACPI perf table. Also adds a check in cpufreq_stats to check for error return from freq_table_get_index() and avoid using the error return value. Patch fixes the issue reported at http://www.ussg.iu.edu/hypermail/linux/kernel/0611.2/0629.html and also other similar issue here http://bugme.osdl.org/show_bug.cgi?id=7383 comment 53 Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com> Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Dave Jones <davej@redhat.com>
2006-12-17[CPUFREQ] set policy->curfreq on initializationMattia Dongili
Check the correct variable and set policy->cur upon acpi-cpufreq initialization to allow the userspace governor to be used as default. Signed-off-by: Mattia Dongili <malattia@linux.it> Acked-by: "Pallipadi, Venkatesh" <venkatesh.pallipadi@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Dave Jones <davej@redhat.com>
2006-12-13[CPUFREQ] Trivial cleanup for acpi read/write port in acpi-cpufreq.cVenkatesh Pallipadi
Small cleanup in acpi-cpufreq. Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Dave Jones <davej@redhat.com>
2006-12-12[CPUFREQ] Fix the bug in duplicate freq elimination code in acpi-cpufreqVenkatesh Pallipadi
Fix the bug in duplicate states elimination in acpi-cpufreq. Bug: Due to duplicate state elimiation in the loop earlier, the number of valid_states can be less than perf->state_count, in which case freq_table was ending up with some garbage/uninitialized entries in the table. Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> From: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Dave Jones <davej@redhat.com>
2006-10-21[CPUFREQ] ifdef more unused on !SMP code.Dave Jones
acpi-cpufreq needs the same patch as the previous speedstep-centrino change. Additionally, the centrino driver can have its ifdef moved out a little further to eliminate some more code/variables. Signed-off-by: Dave Jones <davej@redhat.com>
2006-10-18[CPUFREQ] acpi-cpufreq: Fix up some CodingStyle nits leftover from the ↵Dave Jones
lindenting. Signed-off-by: Dave Jones <davej@redhat.com>
2006-10-18[CPUFREQ] Remove duplicate include from acpi-cpufreqDave Jones
Signed-off-by: Dave Jones <davej@redhat.com>
2006-10-15[CPUFREQ][8/8] acpi-cpufreq: Add support for freq feedback from hardwareVenkatesh Pallipadi
Enable ondemand governor and acpi-cpufreq to use IA32_APERF and IA32_MPERF MSR to get active frequency feedback for the last sampling interval. This will make ondemand take right frequency decisions when hardware coordination of frequency is going on. Without APERF/MPERF, ondemand can take wrong decision at times due to underlying hardware coordination or TM2. Example: * CPU 0 and CPU 1 are hardware cooridnated. * CPU 1 running at highest frequency. * CPU 0 was running at highest freq. Now ondemand reduces it to some intermediate frequency based on utilization. * Due to underlying hardware coordination with other CPU 1, CPU 0 continues to run at highest frequency (as long as other CPU is at highest). * When ondemand samples CPU 0 again next time, without actual frequency feedback from APERF/MPERF, it will think that previous frequency change was successful and can go to wrong target frequency. This is because it thinks that utilization it has got this sampling interval is when running at intermediate frequency, rather than actual highest frequency. More information about IA32_APERF IA32_MPERF MSR: Refer to IA-32 Intel® Architecture Software Developer's Manual at http://developer.intel.com Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Dave Jones <davej@redhat.com>
2006-10-15[CPUFREQ][7/8] acpi-cpufreq: Fix get of current frequency breakageVenkatesh Pallipadi
Recent speedstep-centrino unification onto acpi-cpufreq patchset broke cpuinfo_cur_freq interface in /sys/../cpuinfo/, when MSR was used for transitions. Attached patch fixes that breakage. Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Dave Jones <davej@redhat.com>
2006-10-15[CPUFREQ][6/8] acpi-cpufreq: Eliminate get of current freq on notificationVenkatesh Pallipadi
Only change the frequency if the state previously set is different from what we are trying to set. We don't really have to get the current frequency at this point. Signed-off-by: Denis Sadykov <denis.m.sadykov@intel.com> Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Dave Jones <davej@redhat.com>
2006-10-15[CPUFREQ][5/8] acpi-cpufreq: lindent acpi-cpufreq.cVenkatesh Pallipadi
Lindent acpi-cpufreq. Additional changes replacing "return (..)" by "return ..". No functionality changes in this patch. Signed-off-by: Denis Sadykov <denis.m.sadykov@intel.com> Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Dave Jones <davej@redhat.com>
2006-10-15[CPUFREQ][3/8] acpi-cpufreq: Pull in MSR based transition supportVenkatesh Pallipadi
Add in the support for Intel Enhanced Speedstep - MSR based transitions. With this change, the ACPI based support in speedstep-centrino can be deprecated and duplicate code in that driver can be marked for removal. Much easier to maintain and support this way. This also reduces the user misconfigurations and questions on which driver is to be used under which CPUs to support Enhanced Speedstep. Signed-off-by: Denis Sadykov <denis.m.sadykov@intel.com> Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Dave Jones <davej@redhat.com>
2006-10-15[CPUFREQ][2/8] acpi: reorganize code to make MSR support addition easierVenkatesh Pallipadi
Some clean up and redsign of the driver. Mainly making it easier to add support for multiple sub-mechanisms of changing frequency. Currently this driver supports only ACPI SYSTEM_IO address space. With the changes below it is easier to add support for other address spaces like Intel Enhanced Speedstep which uses MSR (ACPI FIXED_FEATURE_HARDWARE) to do the transitions. Signed-off-by: Denis Sadykov <denis.m.sadykov@intel.com> Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Dave Jones <davej@redhat.com>
2006-10-15[CPUFREQ][1/8] acpi-cpufreq: software coordination and handle all CPUs in ↵Venkatesh Pallipadi
the group This patchset has refresh/rebase of a bunch of patches/bugfixes related to acpi-cpufreq that were sent earlier on this list. patch 1/8 Patch that fixes a bug in swcoordination code in acpi-cpufreq patch 2/8 through patch 7/8 Grand unification of ACPI based speedstep-centrino and acpi-cpufreq drivers. ACPI allows P-state transitions in multiple ways. Like using IO ports or using processor native method (MSR). Without this patch, IO port based P-state transitions are handled in acpi-cpufreq driver and MSR based transitions on Intel CPUs are handled in speedstep-centrino driver. Even though most of the code in these two drivers should be similar, except for final changing/checking of frequency (one driver does it using IO port and other does it through MSR), we have duplicated code in these two drivers. There are also issues around BIOSes supporting both MSR and IO port and which driver should be loaded first in standard installations. The patchset combines functionality of these two driver into acpi-cpufreq driver. ACPI based functionality in speedstep-centrino is marked deprecated and will be removed in future. speedstep-centrino will continue to work on systems that depend on older non-ACPI table based P-state chanes. * 2/8 - Patch that reorganizes the code in acpi-cpufreq, cleaning it up a little and making it easier to add MSR support later. * 3/8 - Pull in the MSR based transition support into acpi-cpufreq. * 4/8 - Mark speedstep-centrino deprecated. Change the order in Makefile to load acpi-cpufreq first and speedstep-centrino later, in cases where both are configured in. * 5/8 - lindent acpi-cpufreq.c * 6/8 - Minor change to eliminate the check of current frequency on notifications. We can use last set frequency instead. * 7/8 - Make cpufreq->get of acpi_cpufreq work correctly again. There will be a patch in future that removes ACPI based support in speedstep-centrino in coming months. patch 8/8 Add support for IA32_APERF and IA32_MPERF MSR and get the actual frequency from these MSRs and use it to determine the next frequency target in ondemand governor This patch: There is a bug in software coordination patch in acpi-cpufreq, due to which frequency will only be set on first CPU of any coordinated group. Bug identified by Denis, was not recognised earlier as there are no platforms yet that use software coordination with acpi-cpufreq driver. Signed-off-by: Denis Sadykov <denis.m.sadykov@intel.com> Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Dave Jones <davej@redhat.com>
2006-09-30[CPUFREQ] Make acpi-cpufreq unsticky again.Dave Jones
This caused suspend/resume regressions. Signed-off-by: Dave Jones <davej@redhat.com>
2006-09-26[CPUFREQ] Fix section mismatch warningVenkatesh Pallipadi
Make the sections proper and get rid of section mismatch warnings. Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Dave Jones <davej@redhat.com>
2006-09-05[CPUFREQ] Workaround for BIOS bug in software coordination of frequencyVenkatesh Pallipadi
Some buggy BIOSes do a "software any" kind of coordination without telling about it to OS. So, when OS sets frequency on one CPU on these platforms, it will also impact all the other logical CPUs that are in the same power domain. Attached patch is a workaround for those buggy BIOSes. Patch should be a noop on the normal non-buggy platforms. Applies over previously sent acpi-cpufreq and software coordination bug fix patch Signed-off-by: Denis Sadykov <denis.m.sadykov@intel.com> Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Dave Jones <davej@redhat.com>
2006-08-27[PATCH] cpufreq: acpi-cpufreq: Ignore failure from acpi_cpufreq_early_init_acpiDave Jones
Ignore the return value of early_init_acpi(), as it can give false error messages. If there is something really wrong, then register_driver will fail cleanly with EINVAL later. [ background: modprobe acpi-cpufreq on systems not capable of speed-scaling started failing with 'invalid argument', where previously it would only ever -ENODEV I'm not 100% happy with the solution. It'd be better to handle failure properly, but this is a low-impact change for 2.6.18 We can always revisit doing this better in .19 --davej.] Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Dave Jones <davej@redhat.com> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-31[CPUFREQ] Propagate acpi_processor_preregister_performance return value.bert hubert
Note how any error from acpi_processor_preregister_performance is ignored. From: bert hubert <bert.hubert@netherlabs.nl> Signed-off-by: Dave Jones <davej@redhat.com>
2006-06-30Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivialLinus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial: Remove obsolete #include <linux/config.h> remove obsolete swsusp_encrypt arch/arm26/Kconfig typos Documentation/IPMI typos Kconfig: Typos in net/sched/Kconfig v9fs: do not include linux/version.h Documentation/DocBook/mtdnand.tmpl: typo fixes typo fixes: specfic -> specific typo fixes in Documentation/networking/pktgen.txt typo fixes: occuring -> occurring typo fixes: infomation -> information typo fixes: disadvantadge -> disadvantage typo fixes: aquire -> acquire typo fixes: mecanism -> mechanism typo fixes: bandwith -> bandwidth fix a typo in the RTC_CLASS help text smb is no longer maintained Manually merged trivial conflict in arch/um/kernel/vmlinux.lds.S
2006-06-30Remove obsolete #include <linux/config.h>Jörn Engel
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-06-26ACPI: HW P-state coordination supportVenkatesh Pallipadi
Treat HW coordination as independent CPUs. This enables per-cpu monintoring of P-states http://bugzilla.kernel.org/show_bug.cgi?id=5737 Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-25[PATCH] remove for_each_cpu()Andrew Morton
Convert a few stragglers over to for_each_possible_cpu(), remove for_each_cpu(). Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-23Merge branch 'release' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (65 commits) ACPI: suppress power button event on S3 resume ACPI: resolve merge conflict between sem2mutex and processor_perflib.c ACPI: use for_each_possible_cpu() instead of for_each_cpu() ACPI: delete newly added debugging macros in processor_perflib.c ACPI: UP build fix for bugzilla-5737 Enable P-state software coordination via _PDC P-state software coordination for speedstep-centrino P-state software coordination for acpi-cpufreq P-state software coordination for ACPI core ACPI: create acpi_thermal_resume() ACPI: create acpi_fan_suspend()/acpi_fan_resume() ACPI: pass pm_message_t from acpi_device_suspend() to root_suspend() ACPI: create acpi_device_suspend()/acpi_device_resume() ACPI: replace spin_lock_irq with mutex for ec poll mode ACPI: Allow a WAN module enable/disable on a Thinkpad X60. sem2mutex: acpi, acpi_link_lock ACPI: delete unused acpi_bus_drivers_lock sem2mutex: drivers/acpi/processor_perflib.c ACPI add ia64 exports to build acpi_memhotplug as a module ACPI: asus_acpi_init(): propagate correct return value ... Manual resolve of conflicts in: arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c include/acpi/processor.h
2006-06-01[CPUFREQ] Make acpi-cpufreq 'sticky'.Dave Jones
This prevents annoying messages being printed when it gets loaded on a machine that doesn't have support scaling via ACPI. Signed-off-by: Dave Jones <davej@redhat.com>
2006-05-30[CPUFREQ] Remove pointless reinitialisations in acpi-cpufreqDave Jones
Signed-off-by: Dave Jones <davej@redhat.com>
2006-04-01ACPI: UP build fix for bugzilla-5737Andrew Morton
cpu_online_map doesn't exist if !CONFIG_SMP. Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
2006-02-09P-state software coordination for acpi-cpufreqVenkatesh Pallipadi
http://bugzilla.kernel.org/show_bug.cgi?id=5737 Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2006-01-24[ACPI] merge 3549 4320 4485 4588 4980 5483 5651 acpica asus fops pnpacpi ↵Len Brown
branches into release Signed-off-by: Len Brown <len.brown@intel.com>
2006-01-11[PATCH] x86_64: Use X86_FEATURE_CONSTANT_TSC now to clean up Intel speedstep ↵Andi Kleen
drivers They previously tried to figure this out on their own. Suggested by Venkatesh. Cc: venkatesh.pallipadi@intel.com Cc: davej@redhat.com Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-07[ACPI] fix acpi_cpufreq.c build warrningBenoit Boissinot
Signed-off-by: Benoit Boissinot <benoit.boissinot@ens-lyon.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
2005-12-01[ACPI] Avoid BIOS inflicted crashes by evaluating _PDC only onceVenkatesh Pallipadi
Linux invokes the AML _PDC method (Processor Driver Capabilities) to tell the BIOS what features it can handle. While the ACPI spec says nothing about the OS invoking _PDC multiple times, doing so with changing bits seems to hopelessly confuse the BIOS on multiple platforms up to and including crashing the system. Factor out the _PDC invocation so Linux invokes it only once. http://bugzilla.kernel.org/show_bug.cgi?id=5483 Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2005-11-07Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreqLinus Torvalds
2005-10-30[PATCH] fix missing includesTim Schmielau
I recently picked up my older work to remove unnecessary #includes of sched.h, starting from a patch by Dave Jones to not include sched.h from module.h. This reduces the number of indirect includes of sched.h by ~300. Another ~400 pointless direct includes can be removed after this disentangling (patch to follow later). However, quite a few indirect includes need to be fixed up for this. In order to feed the patches through -mm with as little disturbance as possible, I've split out the fixes I accumulated up to now (complete for i386 and x86_64, more archs to follow later) and post them before the real patch. This way this large part of the patch is kept simple with only adding #includes, and all hunks are independent of each other. So if any hunk rejects or gets in the way of other patches, just drop it. My scripts will pick it up again in the next round. Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-20[CPUFREQ] kzalloc conversions for i386 drivers.Dave Jones
Signed-off-by: Dave Jones <davej@redhat.com>
2005-08-26[ACPI] Reduce acpi-cpufreq switching latency by 50%Venkatesh Pallipadi
The acpi-cpufreq driver does a P-state get after a P-state set to verify whether set went through successfully. This test is kind of redundant as set goes throught most of the times, and the test is also expensive as a get of P-states can take a lot of time (same as a set operation) as it goes through SMM mode. Effectively, we are doubling the P-state latency due to this get opertion. momdule parameter "acpi_pstate_strict" restores orginal paranoia. http://bugzilla.kernel.org/show_bug.cgi?id=5129 Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2005-07-29[ACPI] Always set P-state on initializationDominik Brodowski
Otherwise a platform that supports ACPI based cpufreq and boots up at lowest possible speed could stay there forever. This because the governor may request max speed, but the code doesn't update if there is no change in speed, and it assumed the initial state of max speed. http://bugzilla.kernel.org/show_bug.cgi?id=4634 Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2005-04-16Linux-2.6.12-rc2v2.6.12-rc2Linus Torvalds
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!