summaryrefslogtreecommitdiff
path: root/drivers/acpi/processor_thermal.c
Commit message (Collapse)AuthorAgeFilesLines
* ACPI: Do cpufreq clamping for throttling per package v2Andi Kleen2012-04-131-8/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 2815ab92ba3ab27556212cc306288dc95692824b upstream. On Intel CPUs the processor typically uses the highest frequency set by any logical CPU. When the system overheats Linux first forces the frequency to the lowest available one to lower the temperature. However this was done only per logical CPU, which means all logical CPUs in a package would need to go through this before the frequency is actually lowered. Worse this delay actually prevents real throttling, because the real throttle code only proceeds when the lowest frequency is already reached. So when a throttle event happens force the lowest frequency for all CPUs in the package where it happened. The per CPU state is now kept per package, not per logical CPU. An alternative would be to do it per cpufreq unit, but since we want to bring down the temperature of the complete chip it's better to do it for all. In principle it may even make sense to do it for all CPUs, but I kept it on the package for now. With this change the frequency is actually lowered, which in terms also allows real throttling to proceed. I also removed an unnecessary per cpu variable initialization. v2: Fix package mapping Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ACPI thermal: remove two unused functionsZhang Rui2010-12-111-9/+0
| | | | | | | | | | | | | When CONFIG_CPU_FREQ=n ... drivers/acpi/processor_thermal.c:159:12: warning: ‘acpi_thermal_cpufreq_increase’ defined but not used drivers/acpi/processor_thermal.c:163:12: warning: ‘acpi_thermal_cpufreq_decrease’ defined but not used Remove unused declaration of ‘acpi_thermal_cpufreq_increase’ and ‘acpi_thermal_cpufreq_decrease’ Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: thermal: remove unused limit codeLen Brown2010-10-191-71/+0
| | | | | | | | acpi_processor_apply_limit() acpi_thermal_cpufreq_increase() acpi_thermal_cpufreq_decrease() Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: remove dead codeStephen Hemminger2010-10-191-107/+0
| | | | | | | Found by running make namespacecheck on linux-next Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI processor: remove deprecated ACPI procfs I/FZhang Rui2010-08-151-83/+0
| | | | | | | | | | | | | Remove deprecated ACPI processor procfs I/F, including: /proc/acpi/processor/CPUX/power /proc/acpi/processor/CPUX/limit /proc/acpi/processor/CPUX/info /proc/acpi/processor/CPUX/throttling still exists, as we don't have sysfs I/F available for now. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: Remove unnecessary cast.H Hartley Sweeten2010-01-151-2/+1
| | | | | | | | The struct seq_file 'private' member is a void *, the cast is not needed. Also, remove an extra whitespace line. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Len Brown <len.brown@intel.com>
* Merge branch 'processor-procfs-2.6.32' into releaseLen Brown2009-09-191-1/+2
|\
| * ACPI: Make ACPI processor proc I/F depend on the ACPI_PROCFSZhao Yakui2009-06-241-1/+2
| | | | | | | | | | | | | | | | | | | | Now whether the ACPI processor proc I/F is registered depends on the CONFIG_PROC. It had better depend on the CONFIG_ACPI_PROCFS. When the CONFIG_ACPI_PROCFS is unset in kernel configuration, the ACPI processor proc I/F won't be registered. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: Move definition of PREFIX from acpi_bus.h to internal..hLen Brown2009-08-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Linux/ACPI core files using internal.h all PREFIX "ACPI: ", however, not all ACPI drivers use/want it -- and they should not have to #undef PREFIX to define their own. Add GPL commment to internal.h while we are there. This does not change any actual console output, asside from a whitespace fix. Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI processor: force throttling state when BIOS returns incorrect valueFrans Pop2009-08-261-3/+3
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the BIOS reports an invalid throttling state (which seems to be fairly common after system boot), a reset is done to state T0. Because of a check in acpi_processor_get_throttling_ptc(), the reset never actually gets executed, which results in the error reoccurring on every access of for example /proc/acpi/processor/CPU0/throttling. Add a 'force' option to acpi_processor_set_throttling() to ensure the reset really takes effect. Addresses http://bugzilla.kernel.org/show_bug.cgi?id=13389 This patch, together with the next one, fixes a regression introduced in 2.6.30, listed on the regression list. They have been available for 2.5 months now in bugzilla, but have not been picked up, despite various reminders and without any reason given. Google shows that numerous people are hitting this issue. The issue is in itself relatively minor, but the bug in the code is clear. The patches have been in all my kernels and today testing has shown that throttling works correctly with the patches applied when the system overheats (http://bugzilla.kernel.org/show_bug.cgi?id=13918#c14). Signed-off-by: Frans Pop <elendil@planet.nl> Acked-by: Zhang Rui <rui.zhang@intel.com> Cc: Len Brown <lenb@kernel.org> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge branch 'constify' into releaseLen Brown2009-04-051-1/+1
|\
| * ACPI: constify VFTs (1/2)Jan Engelhardt2009-04-031-1/+1
| | | | | | | | | | Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Len Brown <len.brown@intel.com>
* | thermal: use integers rather than strings for thermal valuesMatthew Garrett2009-02-201-9/+11
|/ | | | | | | | | | | The thermal API currently uses strings to pass values to userspace. This makes it difficult to use from within the kernel. Change the interface to use integers and fix up the consumers. Signed-off-by: Matthew Garrett <mjg@redhat.com> Acked-by: Zhang Rui <rui.zhang@intel.com> Acked-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: consolidate ACPI_*_COMPONENT definitions in acpi_drivers.hBjorn Helgaas2008-11-071-1/+0
| | | | | | | | Move all the component definitions for drivers to a single shared place, include/acpi/acpi_drivers.h. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
* acpi: use non-racy method for proc entries creationDenis V. Lunev2008-04-291-0/+1
| | | | | | | | | | | | | | Use proc_create()/proc_create_data() to make sure that ->proc_fops and ->data be setup before gluing PDE to main tree. Add correct ->owner to proc_fops to fix reading/module unloading race. Signed-off-by: Denis V. Lunev <den@openvz.org> Cc: Len Brown <lenb@kernel.org> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [CPUFREQ] change cpu freq tables to per_cpu variablesMike Travis2008-04-281-14/+16
| | | | | | | | | | | Change cpufreq tables from arrays to per_cpu variables in drivers/acpi/processor_thermal.c Based on git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git Cc: Len Brown <len.brown@intel.com> Signed-off-by: Mike Travis <travis@sgi.com> Signed-off-by: Dave Jones <davej@codemonkey.org.uk>
* ACPI: register ACPI Processor as generic thermal cooling deviceZhang Rui2008-02-011-5/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Register ACPI processor as thermal cooling devices. A combination of processor T-state and P-state are used for thermal throttling. the processor will reduce the frequency first and then set the T-state. we use cpufreq_thermal_reduction_pctg to calculate the cpufreq limit, and call cpufreq_verify_with_limit to set the cpufreq limit. if cpufreq driver is loaded, then we have four cooling state for cpufreq control. cooling state 0: cpufreq limit == max_freq cooling state 1: cpufreq limit == max_freq * 80% cooling state 2: cpufreq limit == max_freq * 60% cooling state 3: cpufreq limit == max_freq * 40% after the cpufreq limit is set to 40 percentage of the max_freq, we use T-state for cooling. eg. a processor has P-state support, and it has 8 T-state (T0-T7), the max_state of the proceesor is 10: state cpufreq-limit T-state 0: max_freq T0 1: max_freq * 80% T0 2: max_freq * 60% T0 3: max_freq * 40% T0 4: max_freq * 40% T1 5: max_freq * 40% T2 6: max_freq * 40% T3 7: max_freq * 40% T4 8: max_freq * 40% T5 9: max_freq * 40% T6 10: max_freq * 40% T7 Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Thomas Sujith <sujith.thomas@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: delete extra #defines in /drivers/acpi/ driversLen Brown2007-02-121-1/+0
| | | | | | | | | Cosmetic only. Except in a single case, #define ACPI_*_DRIVER_NAME were invoked 0 or 1 times. Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: clean up ACPI_MODULE_NAME() useLen Brown2007-02-121-1/+1
| | | | | | | | | | cosmetic only Make "module name" actually match the file name. Invoke with ';' as leaving it off confuses Lindent and gcc doesn't care. Fix indentation where Lindent did get confused. Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: Remove unnecessary from/to-void* and to-void casts in drivers/acpiJan Engelhardt2006-10-141-3/+3
| | | | | Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: delete tracing macros from drivers/acpi/*.cPatrick Mochel2006-06-271-21/+16
| | | | Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: un-export ACPI_ERROR() -- use printk(KERN_ERR...)Len Brown2006-06-271-4/+4
| | | | Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: Enable ACPI error messages w/o CONFIG_ACPI_DEBUGThomas Renninger2006-06-261-7/+4
| | | | | Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* [ACPI] make two processor functions staticAdrian Bunk2006-01-081-3/+3
| | | | | | | | | acpi_processor_write_throttling() acpi_processor_write_limit() Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
* [ACPI] move some run-time structure inits to compile timeArjan van de Ven2006-01-071-0/+1
| | | | | | | | | | | acpi_processor_limit_fops.write was written at run time, but can be initiailized at compile-time instead. Similar for acpi_video_bus_POST_fops.write and friends, but keep doing those at runtime to avoid prototype-hell. Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Len Brown <len.brown@intel.com>
* [ACPI] fix passive cooling regressionThomas Renninger2005-12-221-2/+2
| | | | | | | | | | | Return logic was inverted. Going for changing the return value to not return zero as it is makes more sense regarding the naming of the function (cpu_has_cpufreq()). http://bugzilla.kernel.org/show_bug.cgi?id=3410 Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* [ACPI] Allow return to active cooling mode once passive mode is enteredThomas Renninger2005-11-301-15/+23
| | | | | | | | | | | http://bugzilla.kernel.org/show_bug.cgi?id=3410 https://bugzilla.novell.com/show_bug.cgi?id=131543 Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Konstantin Karasyov <konstantin.a.karasyov@intel.com> Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Yu Luming <luming.yu@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org>
* [ACPI] Lindent all ACPI filesLen Brown2005-08-051-84/+69
| | | | Signed-off-by: Len Brown <len.brown@intel.com>
* Linux-2.6.12-rc2v2.6.12-rc2Linus Torvalds2005-04-161-0/+406
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!