arch/i386/kernel/kgdb_stub.c | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) diff -puN arch/i386/kernel/kgdb_stub.c~kgdb-ga-smp_num_cpus arch/i386/kernel/kgdb_stub.c --- 25/arch/i386/kernel/kgdb_stub.c~kgdb-ga-smp_num_cpus 2003-04-24 05:17:46.000000000 -0700 +++ 25-akpm/arch/i386/kernel/kgdb_stub.c 2003-04-24 05:17:46.000000000 -0700 @@ -195,7 +195,6 @@ void smp_send_nmi_allbutself(void); #define hold_init hold_on_sstep: 1, #define MAX_CPU_MASK (unsigned long)((1LL << MAX_NO_CPUS) - 1LL) #define NUM_CPUS num_online_cpus() -int smp_num_cpus; extern volatile unsigned long cpu_callout_map; #else #define IF_SMP(x) @@ -1196,10 +1195,10 @@ kgdb_handle_exception(int exceptionVecto rdtsc(dum, time); end_time = time + 2; /* Note: we use the High order bits! */ i = 1; - if ((smp_num_cpus = NUM_CPUS) > 1) { + if (num_online_cpus() > 1) { int me_in_kgdb = in_kgdb_entry_log[smp_processor_id()]; smp_send_nmi_allbutself(); - while (i < smp_num_cpus && time != end_time) { + while (i < num_online_cpus() && time != end_time) { int j; for (j = 0; j < MAX_NO_CPUS; j++) { if (waiting_cpus[j].task && @@ -1246,7 +1245,7 @@ kgdb_handle_exception(int exceptionVecto rdtsc(dum, time); } - if (i < smp_num_cpus) { + if (i < num_online_cpus()) { printk ("kgdb : time out, proceeding without sync\n"); #if 0 @@ -1274,7 +1273,7 @@ kgdb_handle_exception(int exceptionVecto printk ("kgdb : %d cpus, but watchdog not active\n" "proceeding without locking down other cpus\n", - smp_num_cpus); + num_online_cpus()); entry_state = NO_NMI; } } _