diff options
author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2013-03-05 13:42:54 -0500 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2013-03-06 10:00:34 -0500 |
commit | c705c78c0d0835a4aa5d0d9a3422e3218462030c (patch) | |
tree | 9bfee4fa0239cdfbe3d1678d66172276b999abb9 /drivers/xen | |
parent | bdc5c1812cea6efe1aaefb3131fcba28cd0b2b68 (diff) |
acpi: Export the acpi_processor_get_performance_info
The git commit d5aaffa9dd531c978c6f3fea06a2972653bd7fc8
(cpufreq: handle cpufreq being disabled for all exported function)
tightens the cpufreq API by returning errors when disable_cpufreq()
had been called.
The problem we are hitting is that the module xen-acpi-processor which
uses the ACPI's functions: acpi_processor_register_performance,
acpi_processor_preregister_performance, and acpi_processor_notify_smm
fails at acpi_processor_register_performance with -22.
Note that earlier during bootup in arch/x86/xen/setup.c there is also
an call to cpufreq's API: disable_cpufreq().
This is b/c we want the Linux kernel to parse the ACPI data, but leave
the cpufreq decisions to the hypervisor.
In v3.9 all the checks that d5aaffa9dd531c978c6f3fea06a2972653bd7fc8
added are now hit and the calls to cpufreq_register_notifier will now
fail. This means that acpi_processor_ppc_init ends up printing:
"Warning: Processor Platform Limit not supported"
and the acpi_processor_ppc_status is not set.
The repercussions of that is that the call to
acpi_processor_register_performance fails right away at:
if (!(acpi_processor_ppc_status & PPC_REGISTERED))
and we don't progress any further on parsing and extracting the _P*
objects.
The only reason the Xen code called that function was b/c it was
exported and the only way to gather the P-states. But we can also
just make acpi_processor_get_performance_info be exported and not
use acpi_processor_register_performance. This patch does so.
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/xen')
-rw-r--r-- | drivers/xen/xen-acpi-processor.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/xen/xen-acpi-processor.c b/drivers/xen/xen-acpi-processor.c index 316df65163cf..f3278a6603ca 100644 --- a/drivers/xen/xen-acpi-processor.c +++ b/drivers/xen/xen-acpi-processor.c | |||
@@ -500,16 +500,16 @@ static int __init xen_acpi_processor_init(void) | |||
500 | (void)acpi_processor_preregister_performance(acpi_perf_data); | 500 | (void)acpi_processor_preregister_performance(acpi_perf_data); |
501 | 501 | ||
502 | for_each_possible_cpu(i) { | 502 | for_each_possible_cpu(i) { |
503 | struct acpi_processor *pr; | ||
503 | struct acpi_processor_performance *perf; | 504 | struct acpi_processor_performance *perf; |
504 | 505 | ||
506 | pr = per_cpu(processors, i); | ||
505 | perf = per_cpu_ptr(acpi_perf_data, i); | 507 | perf = per_cpu_ptr(acpi_perf_data, i); |
506 | rc = acpi_processor_register_performance(perf, i); | 508 | pr->performance = perf; |
509 | rc = acpi_processor_get_performance_info(pr); | ||
507 | if (rc) | 510 | if (rc) |
508 | goto err_out; | 511 | goto err_out; |
509 | } | 512 | } |
510 | rc = acpi_processor_notify_smm(THIS_MODULE); | ||
511 | if (rc) | ||
512 | goto err_unregister; | ||
513 | 513 | ||
514 | for_each_possible_cpu(i) { | 514 | for_each_possible_cpu(i) { |
515 | struct acpi_processor *_pr; | 515 | struct acpi_processor *_pr; |