[patch 09/11] x86: nmi_32.c cleanup - use for_each_online_cpu helper

From: Cyrill Gorcunov
Date: Sat May 24 2008 - 11:44:28 EST


Since cpu_online_map is touched (by for_each_online_cpu)
at moment when cpu_callin_map is already filled up we can
get rid of its checking at all

Signed-off-by: Cyrill Gorcunov <gorcunov@xxxxxxxxx>
---

Index: linux-2.6.git/arch/x86/kernel/nmi_32.c
====================================================================
--- linux-2.6.git.orig/arch/x86/kernel/nmi_32.c 2008-05-24 13:16:48.000000000 +0400
+++ linux-2.6.git/arch/x86/kernel/nmi_32.c 2008-05-24 13:20:13.000000000 +0400
@@ -108,13 +108,7 @@ int __init check_nmi_watchdog(void)
local_irq_enable();
mdelay((20*1000)/nmi_hz); // wait 20 ticks

- for_each_possible_cpu(cpu) {
-#ifdef CONFIG_SMP
- /* Check cpu_callin_map here because that is set
- after the timer is started. */
- if (!cpu_isset(cpu, cpu_callin_map))
- continue;
-#endif
+ for_each_online_cpu(cpu) {
if (!per_cpu(wd_enabled, cpu))
continue;
if (nmi_count(cpu) - prev_nmi_count[cpu] <= 5) {

--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/