Skip to content

Commit

Permalink
x86: nmi_32.c cleanup - use for_each_online_cpu helper
Browse files Browse the repository at this point in the history
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@gmail.com>
Cc: hpa@zytor.com
Cc: mingo@redhat.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Cyrill Gorcunov authored and Thomas Gleixner committed May 25, 2008
1 parent 96f9dcb commit 7c2ba83
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions arch/x86/kernel/nmi_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 7c2ba83

Please sign in to comment.