Well it turns out that retrying the NMI_IPI is not a good idea. This **final** patch presents the minimal changes needed to address the issues previously stated and supersedes all previous postings. BTW this was derived from the trini's linux-2.6-kgdb-testing tree:
diff --git a/kernel/kgdb.c b/kernel/kgdb.c index a60550f..394ab61 100644 --- a/kernel/kgdb.c +++ b/kernel/kgdb.c @@ -901,9 +901,11 @@ int kgdb_handle_exception(int ex_vector, kgdb_disable_hw_debug(linux_regs); - if (!debugger_step || !kgdb_contthread) + if (!debugger_step || !kgdb_contthread) { + add_preempt_count(HARDIRQ_OFFSET); for (i = 0; i < NR_CPUS; i++) spin_lock(&slavecpulocks[i]); + } #ifdef CONFIG_SMP /* Make sure we get the other CPUs */ @@ -1367,6 +1369,7 @@ int kgdb_handle_exception(int ex_vector, cpu_relax(); } } + sub_preempt_count(IRQ_EXIT_OFFSET); } #ifdef CONFIG_SMP diff --git a/kernel/timer.c b/kernel/timer.c index 1d7dd62..4c3e7d2 100644 --- a/kernel/timer.c +++ b/kernel/timer.c @@ -34,6 +34,7 @@ #include <linux/cpu.h> #include <linux/syscalls.h> #include <linux/delay.h> +#include <linux/kgdb.h> #include <asm/uaccess.h> #include <asm/unistd.h> @@ -1176,6 +1177,10 @@ void update_process_times(int user_tick) struct task_struct *p = current; int cpu = smp_processor_id(); +#ifdef CONFIG_KGDB + if (atomic_read(&cpu_doing_single_step) == cpu) + return; +#endif /* Note: this timer irq context must be accounted for as well. */ if (user_tick) account_user_time(p, jiffies_to_cputime(1)); ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Kgdb-bugreport mailing list Kgdb-bugreport@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport