Signed-off-by: Andrew Morton <akpm@osdl.org>
Index: linux-2.6.18-rc6/include/linux/kgdb.h
===================================================================
--- linux-2.6.18-rc6.orig/include/linux/kgdb.h	2006-09-14 15:46:42.000000000 +0100
+++ linux-2.6.18-rc6/include/linux/kgdb.h	2006-09-14 16:09:26.000000000 +0100
@@ -38,6 +38,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;
 
Index: linux-2.6.18-rc6/kernel/kgdb.c
===================================================================
--- linux-2.6.18-rc6.orig/kernel/kgdb.c	2006-09-14 15:46:45.000000000 +0100
+++ linux-2.6.18-rc6/kernel/kgdb.c	2006-09-14 16:09:26.000000000 +0100
@@ -123,6 +123,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,
@@ -1058,6 +1060,8 @@ int kgdb_handle_exception(int ex_vector,
 		goto acquirelock;
 	}
 
+	atomic_set(&kgdb_sync_softlockup[smp_processor_id()], 1);
+
 	/*
 	* Don't enter if we have hit a removed breakpoint.
 	*/
Index: linux-2.6.18-rc6/kernel/softlockup.c
===================================================================
--- linux-2.6.18-rc6.orig/kernel/softlockup.c	2006-09-04 03:19:48.000000000 +0100
+++ linux-2.6.18-rc6/kernel/softlockup.c	2006-09-14 16:12:55.000000000 +0100
@@ -13,6 +13,7 @@
 #include <linux/kthread.h>
 #include <linux/notifier.h>
 #include <linux/module.h>
+#include <linux/kgdb.h>
 
 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.18-rc6/kernel/timer.c
===================================================================
--- linux-2.6.18-rc6.orig/kernel/timer.c	2006-09-04 03:19:48.000000000 +0100
+++ linux-2.6.18-rc6/kernel/timer.c	2006-09-14 16:09:26.000000000 +0100
@@ -33,6 +33,7 @@
 #include <linux/posix-timers.h>
 #include <linux/cpu.h>
 #include <linux/syscalls.h>
+#include <linux/kgdb.h>
 #include <linux/delay.h>
 
 #include <asm/uaccess.h>
@@ -1258,6 +1259,9 @@ static void run_timer_softirq(struct sof
 void run_local_timers(void)
 {
 	raise_softirq(TIMER_SOFTIRQ);
+#ifdef CONFIG_KGDB
+	if(!atomic_read(&kgdb_sync_softlockup[smp_processor_id()]))
+#endif
 	softlockup_tick();
 }
 
