Skip to contentSkip to conversation

(4/4) cpufreq SMT awareness: code reduction

RFC PATCH New Dominik Brodowski 1 participant 1 message Jun 18, 2004

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 (4/4) cpufreq SMT awareness: code reduction

Remove the FIXME in speedstep-ich, and -- as the UP case is already pre-set in the cpufreq core -- remove the #else statements in p4-clockmod and speedstep-ich.

 arch/i386/kernel/cpu/cpufreq/p4-clockmod.c   |    2 --
 arch/i386/kernel/cpu/cpufreq/speedstep-ich.c |    7 -------
 2 files changed, 9 deletions(-)
arch/i386/kernel/cpu/cpufreq/p4-clockmod.c +0 -2
diff -ruN linux-original/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c linux/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c
@@ -243,8 +243,6 @@
 
 #ifdef CONFIG_SMP
 	policy->cpus = cpu_sibling_map[policy->cpu];
-#else
-	policy->cpus = cpumask_of_cpu(policy->cpu);
 #endif
 
 	return cpufreq_frequency_table_cpuinfo(policy, &p4clockmod_table[0]);
arch/i386/kernel/cpu/cpufreq/speedstep-ich.c +0 -7
diff -ruN linux-original/arch/i386/kernel/cpu/cpufreq/speedstep-ich.c linux/arch/i386/kernel/cpu/cpufreq/speedstep-ich.c
@@ -298,17 +298,10 @@
 	unsigned int	speed;
 	cpumask_t       cpus_allowed;
 
-
-	/* capability check */
-	if (policy->cpu != 0) /* FIXME: better support for SMT in cpufreq core. Up until then, it's better to register only one CPU */
-		return -ENODEV;
-
 	/* only run on CPU to be set, or on its sibling */
 	cpus_allowed = current->cpus_allowed;
 #ifdef CONFIG_SMP
 	policy->cpus = cpu_sibling_map[policy->cpu];
-#else
-	policy->cpus = cpumask_of_cpu(policy->cpu);
 #endif
 	set_cpus_allowed(current, policy->cpus);