Title: [8847] trunk: kgdb: move bpt tasklet to common kgdb code like upstream has done
Revision
8847
Author
vapier
Date
2010-05-25 16:15:54 -0400 (Tue, 25 May 2010)

Log Message

kgdb: move bpt tasklet to common kgdb code like upstream has done

Modified Paths


Diff

Modified: trunk/drivers/net/kgdboe.c (8846 => 8847)


--- trunk/drivers/net/kgdboe.c	2010-05-25 20:06:10 UTC (rev 8846)
+++ trunk/drivers/net/kgdboe.c	2010-05-25 20:15:54 UTC (rev 8847)
@@ -42,32 +42,6 @@
 static struct kgdb_io local_kgdb_io_ops;
 static int use_dynamic_mac;
 
-static atomic_t                 kgdb_break_tasklet_var;
-
-/*
- * There are times a tasklet needs to be used vs a compiled in in
- * break point so as to cause an exception outside a kgdb I/O module,
- * such as is the case with kgdboe, where calling a breakpoint in the
- * I/O driver itself would be fatal.
- */
-static void kgdb_tasklet_bpt(unsigned long ing)
-{
-	kgdb_breakpoint();
-	atomic_set(&kgdb_break_tasklet_var, 0);
-}
-
-static DECLARE_TASKLET(kgdb_tasklet_breakpoint, kgdb_tasklet_bpt, 0);
-
-static void kgdb_schedule_breakpoint(void)
-{
-	if (atomic_read(&kgdb_break_tasklet_var) ||
-		atomic_read(&kgdb_active) != -1 ||
-		atomic_read(&kgdb_setting_breakpoint))
-		return;
-	atomic_inc(&kgdb_break_tasklet_var);
-	tasklet_schedule(&kgdb_tasklet_breakpoint);
-}
-
 MODULE_DESCRIPTION("KGDB driver for network interfaces");
 MODULE_LICENSE("GPL");
 static char config[MAX_CONFIG_LEN];

Modified: trunk/kernel/kgdb.c (8846 => 8847)


--- trunk/kernel/kgdb.c	2010-05-25 20:06:10 UTC (rev 8846)
+++ trunk/kernel/kgdb.c	2010-05-25 20:15:54 UTC (rev 8847)
@@ -130,6 +130,7 @@
  */
 static atomic_t			passive_cpu_wait[NR_CPUS];
 static atomic_t			cpu_in_kgdb[NR_CPUS];
+static atomic_t			kgdb_break_tasklet_var;
 atomic_t			kgdb_setting_breakpoint;
 
 struct task_struct		*kgdb_usethread;
@@ -1651,6 +1652,31 @@
 	}
 }
 
+/*
+ * There are times a tasklet needs to be used vs a compiled in
+ * break point so as to cause an exception outside a kgdb I/O module,
+ * such as is the case with kgdboe, where calling a breakpoint in the
+ * I/O driver itself would be fatal.
+ */
+static void kgdb_tasklet_bpt(unsigned long ing)
+{
+	kgdb_breakpoint();
+	atomic_set(&kgdb_break_tasklet_var, 0);
+}
+
+static DECLARE_TASKLET(kgdb_tasklet_breakpoint, kgdb_tasklet_bpt, 0);
+
+void kgdb_schedule_breakpoint(void)
+{
+	if (atomic_read(&kgdb_break_tasklet_var) ||
+		atomic_read(&kgdb_active) != -1 ||
+		atomic_read(&kgdb_setting_breakpoint))
+		return;
+	atomic_inc(&kgdb_break_tasklet_var);
+	tasklet_schedule(&kgdb_tasklet_breakpoint);
+}
+EXPORT_SYMBOL_GPL(kgdb_schedule_breakpoint);
+
 static void kgdb_initial_breakpoint(void)
 {
 	kgdb_break_asap = 0;
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to