summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/processor_perflib.c
diff options
context:
space:
mode:
authorFenghua Yu <fenghua.yu@intel.com>2007-08-08 00:40:30 +0200
committerLen Brown <len.brown@intel.com>2007-08-08 00:40:30 +0200
commit501092929ccb8a1d2eb0ed700e38df4ae0de7108 (patch)
treec8478b084056949f90ced4d381275cd3e0d634de /drivers/acpi/processor_perflib.c
parentACPI: fix "Time Problems with 2.6.23-rc1-gf695baf2" (diff)
downloadlinux-501092929ccb8a1d2eb0ed700e38df4ae0de7108.tar.xz
linux-501092929ccb8a1d2eb0ed700e38df4ae0de7108.zip
acpi-cpufreq: Fix some x86/x86-64 acpi-cpufreq driver issues
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>
Diffstat (limited to 'drivers/acpi/processor_perflib.c')
-rw-r--r--drivers/acpi/processor_perflib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c
index c4efc0c17f8f..463b0247cbc5 100644
--- a/drivers/acpi/processor_perflib.c
+++ b/drivers/acpi/processor_perflib.c
@@ -539,7 +539,7 @@ end:
}
int acpi_processor_preregister_performance(
- struct acpi_processor_performance **performance)
+ struct acpi_processor_performance *performance)
{
int count, count_target;
int retval = 0;
@@ -567,12 +567,12 @@ int acpi_processor_preregister_performance(
continue;
}
- if (!performance || !performance[i]) {
+ if (!performance || !percpu_ptr(performance, i)) {
retval = -EINVAL;
continue;
}
- pr->performance = performance[i];
+ pr->performance = percpu_ptr(performance, i);
cpu_set(i, pr->performance->shared_cpu_map);
if (acpi_processor_get_psd(pr)) {
retval = -EINVAL;