Skip to contentSkip to conversation

acpi-cpufreq: use cpu_core_map on multicore processors

PATCH In review Alexey Starikovskiy 1 participant 1 message Jul 31, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 6/8 acpi-cpufreq: use cpu_core_map on multicore processors

acpi-cpufreq.c | 11 ++++++++++-

1 file changed, 10 insertions(+), 1 deletion(-)

on some new systems “shared_cpu_map” from ACPI is wrong, so “cpu_core_map” structure is used to define right “policy->cpus” group.

Signed-off: Denis Sadykov <[email protected]>
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi at intel.com>
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy at intel.com>

arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c +0 -0
Index: linux-2.6.17/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
===================================================================
@@ -542,7 +542,16 @@
		}
	}

- policy->cpus = data->acpi_data->shared_cpu_map;
+/* policy->cpus = data->acpi_data->shared_cpu_map; */
+/* NOTE TODO:
+ Actually we must use "shared_cpu_map" from acpi data to define policy->cpus,
+ but on some new systems "shared_cpu_map" is wrong. So we use "cpu_core_map"
+ sructure temporarily. Should be return back. */
+#ifdef CONFIG_SMP
+ policy->cpus = cpu_core_map[cpu];
+#else
+ policy->cpus = cpumask_of_cpu(cpu);
+#endif /* CONFIG_SMP */

	for_each_cpu_mask(i, policy->cpus) {
		drv_data[i] = data;
	}