[PATCH] ppc64: use cpu_has_feature macro
Anton Blanchard
anton at samba.org
Mon May 30 09:37:26 EST 2005
Hi,
Use the new cpu_has_feature macros instead of open coding it.
Signed-off-by: Anton Blanchard <anton at samba.org>
Index: linux-2.6.12-rc2/arch/ppc64/kernel/pSeries_smp.c
===================================================================
--- linux-2.6.12-rc2.orig/arch/ppc64/kernel/pSeries_smp.c 2005-04-26 19:32:20.834218097 +1000
+++ linux-2.6.12-rc2/arch/ppc64/kernel/pSeries_smp.c 2005-04-26 19:32:23.970192943 +1000
@@ -385,7 +385,7 @@
* cpus are assumed to be secondary threads.
*/
if (system_state < SYSTEM_RUNNING &&
- cur_cpu_spec->cpu_features & CPU_FTR_SMT &&
+ cpu_has_feature(CPU_FTR_SMT) &&
!smt_enabled_at_boot && nr % 2 != 0)
return 0;
@@ -429,8 +429,8 @@
#endif
/* Mark threads which are still spinning in hold loops. */
- if (cur_cpu_spec->cpu_features & CPU_FTR_SMT)
- for_each_present_cpu(i) {
+ if (cpu_has_feature(CPU_FTR_SMT)) {
+ for_each_present_cpu(i) {
if (i % 2 == 0)
/*
* Even-numbered logical cpus correspond to
@@ -438,8 +438,9 @@
*/
cpu_set(i, of_spin_map);
}
- else
+ } else {
of_spin_map = cpu_present_map;
+ }
cpu_clear(boot_cpuid, of_spin_map);
More information about the Linuxppc64-dev
mailing list