Commit 519ce3ec authored by Venkatesh Pallipadi's avatar Venkatesh Pallipadi Committed by Dave Jones

[CPUFREQ][1/8] acpi-cpufreq: software coordination and handle all CPUs in 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: default avatarDenis Sadykov <denis.m.sadykov@intel.com>
Signed-off-by: default avatarVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: default avatarDave Jones <davej@redhat.com>
parent eff0df65
...@@ -197,6 +197,7 @@ acpi_cpufreq_target ( ...@@ -197,6 +197,7 @@ acpi_cpufreq_target (
unsigned int relation) unsigned int relation)
{ {
struct cpufreq_acpi_io *data = acpi_io_data[policy->cpu]; struct cpufreq_acpi_io *data = acpi_io_data[policy->cpu];
struct cpufreq_acpi_io *cpudata;
struct acpi_processor_performance *perf; struct acpi_processor_performance *perf;
struct cpufreq_freqs freqs; struct cpufreq_freqs freqs;
cpumask_t online_policy_cpus; cpumask_t online_policy_cpus;
...@@ -260,7 +261,8 @@ acpi_cpufreq_target ( ...@@ -260,7 +261,8 @@ acpi_cpufreq_target (
break; break;
} }
result = acpi_processor_set_performance (data, j, next_state); cpudata = acpi_io_data[j];
result = acpi_processor_set_performance(cpudata, j, next_state);
if (result) { if (result) {
result = -EAGAIN; result = -EAGAIN;
break; break;
...@@ -287,8 +289,11 @@ acpi_cpufreq_target ( ...@@ -287,8 +289,11 @@ acpi_cpufreq_target (
if (!cpus_empty(covered_cpus)) { if (!cpus_empty(covered_cpus)) {
for_each_cpu_mask(j, covered_cpus) { for_each_cpu_mask(j, covered_cpus) {
policy->cpu = j; cpus_clear(set_mask);
acpi_processor_set_performance (data, cpu_set(j, set_mask);
set_cpus_allowed(current, set_mask);
cpudata = acpi_io_data[j];
acpi_processor_set_performance(cpudata,
j, j,
cur_state); cur_state);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment