Skip to contentSkip to conversation

shared_cpu_map member never initialized but possibly used

PATCH Jan Beulich 1 participant 1 message Oct 13, 2011

lore
Share & tools
lore
#0 lore raw

Mark,

in c/s 20361:51b031b0737e you removed the only place where this member got initialized, yet the powernow driver does actually read that field (at least theoretically). Assuming only RevF processors actually used sharing, shouldn't the code reading the field and the field itself be deleted (amending said c/s)?

Thanks, Jan

xen/arch/x86/acpi/cpufreq/powernow.c +1 -11
@@ -199,17 +199,7 @@ static int powernow_cpufreq_cpu_init(str
 
     perf = data->acpi_data;
     policy->shared_type = perf->shared_type;
-
-    /*
-     * Will let policy->cpus know about dependency only when software
-     * coordination is required.
-     */
-    if (policy->shared_type == CPUFREQ_SHARED_TYPE_ALL ||
-        policy->shared_type == CPUFREQ_SHARED_TYPE_ANY) {
-        policy->cpus = perf->shared_cpu_map;
-    } else {
-        policy->cpus = cpumask_of_cpu(cpu);    
-    }
+    cpumask_copy(&policy->cpus, cpumask_of(cpu));
 
     /* capability check */
     if (perf->state_count <= 1) {
xen/include/acpi/cpufreq/processor_perf.h +0 -1
@@ -29,7 +29,6 @@ struct processor_performance {
     uint32_t state_count;
     struct xen_processor_px *states;
     struct xen_psd_package domain_info;
-    cpumask_t shared_cpu_map;
     uint32_t shared_type;
 
     uint32_t init;