Signed off by: Milind Dumbare include/linux/kgdb.h | 1 + kernel/kgdb.c | 5 +++++ kernel/softlockup.c | 4 ++++ kernel/timer.c | 5 +++++ 4 files changed, 15 insertions(+) Index: linux-2.6.19-rc4/kernel/kgdb.c =================================================================== --- linux-2.6.19-rc4.orig/kernel/kgdb.c 2006-11-01 22:19:51.000000000 +0000 +++ linux-2.6.19-rc4/kernel/kgdb.c 2006-11-01 22:33:29.000000000 +0000 @@ -120,6 +120,8 @@ struct debuggerinfo_struct { /* to keep track of the CPU which is doing the single stepping*/ atomic_t cpu_doing_single_step = ATOMIC_INIT(-1); +atomic_t kgdb_sync_softlockup[NR_CPUS] = {ATOMIC_INIT(0)}; + /* reboot notifier block */ static struct notifier_block kgdb_reboot_notifier = { .notifier_call = kgdb_notify_reboot, @@ -545,6 +547,7 @@ static void kgdb_wait(struct pt_regs *re kgdb_info[processor].debuggerinfo = regs; kgdb_info[processor].task = current; atomic_set(&procindebug[processor], 1); + atomic_set(&kgdb_sync_softlockup[smp_processor_id()], 1); /* Wait till master processor goes completely into the debugger. * FIXME: this looks racy */ @@ -848,6 +851,8 @@ int kgdb_handle_exception(int ex_vector, udelay(1); } + atomic_set(&kgdb_sync_softlockup[smp_processor_id()], 1); + /* * Don't enter if the last instance of the exception handler wanted to * come into the debugger again. Index: linux-2.6.19-rc4/kernel/softlockup.c =================================================================== --- linux-2.6.19-rc4.orig/kernel/softlockup.c 2006-11-01 21:38:07.000000000 +0000 +++ linux-2.6.19-rc4/kernel/softlockup.c 2006-11-01 22:33:29.000000000 +0000 @@ -13,6 +13,7 @@ #include #include #include +#include static DEFINE_SPINLOCK(print_lock); @@ -37,6 +38,9 @@ static struct notifier_block panic_block void touch_softlockup_watchdog(void) { __raw_get_cpu_var(touch_timestamp) = jiffies; +#ifdef CONFIG_KGDB + atomic_set(&kgdb_sync_softlockup[raw_smp_processor_id()], 0); +#endif } EXPORT_SYMBOL(touch_softlockup_watchdog); Index: linux-2.6.19-rc4/kernel/timer.c =================================================================== --- linux-2.6.19-rc4.orig/kernel/timer.c 2006-11-01 21:38:07.000000000 +0000 +++ linux-2.6.19-rc4/kernel/timer.c 2006-11-01 22:33:29.000000000 +0000 @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -1043,7 +1044,11 @@ static void run_timer_softirq(struct sof */ void run_local_timers(void) { + int this_cpu = smp_processor_id(); raise_softirq(TIMER_SOFTIRQ); +#ifdef CONFIG_KGDB + if(!atomic_read(&kgdb_sync_softlockup[this_cpu])) +#endif softlockup_tick(); } Index: linux-2.6.19-rc4/include/linux/kgdb.h =================================================================== --- linux-2.6.19-rc4.orig/include/linux/kgdb.h 2006-11-01 22:19:51.000000000 +0000 +++ linux-2.6.19-rc4/include/linux/kgdb.h 2006-11-01 22:33:29.000000000 +0000 @@ -41,6 +41,7 @@ extern struct tasklet_struct kgdb_taskle extern atomic_t kgdb_setting_breakpoint; extern atomic_t cpu_doing_single_step; +extern atomic_t kgdb_sync_softlockup[NR_CPUS]; extern struct task_struct *kgdb_usethread, *kgdb_contthread;