Skip to content

Commit f11e2bc

Browse files
kgdb: Remove kgdb_schedule_breakpoint()
To the very best of my knowledge there has never been any in-tree code that calls this function. It exists largely to support an out-of-tree driver that provides kgdb-over-ethernet using the netpoll API. kgdboe has been out-of-tree for more than 10 years and I don't recall any serious attempt to upstream it at any point in the last five. At this stage it looks better to stop carrying this code in the kernel and integrate the code into the out-of-tree driver instead. The long term trajectory for the kernel looks likely to include effort to remove or reduce the use of tasklets (something that has also been true for the last 10 years). Thus the main real reason for this patch is to make explicit that the in-tree kgdb features do not require tasklets. Signed-off-by: Daniel Thompson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Douglas Anderson <[email protected]> Acked-by: Davidlohr Bueso <[email protected]> Acked-by: Jason Wessel <[email protected]>
1 parent 93f7a6d commit f11e2bc

File tree

2 files changed

+0
-27
lines changed

2 files changed

+0
-27
lines changed

include/linux/kgdb.h

-1
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,6 @@ extern char *kgdb_mem2hex(char *mem, char *buf, int count);
325325
extern int kgdb_hex2mem(char *buf, char *mem, int count);
326326

327327
extern int kgdb_isremovedbreak(unsigned long addr);
328-
extern void kgdb_schedule_breakpoint(void);
329328
extern int kgdb_has_hit_break(unsigned long addr);
330329

331330
extern int

kernel/debug/debug_core.c

-26
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ static DEFINE_RAW_SPINLOCK(dbg_slave_lock);
119119
*/
120120
static atomic_t masters_in_kgdb;
121121
static atomic_t slaves_in_kgdb;
122-
static atomic_t kgdb_break_tasklet_var;
123122
atomic_t kgdb_setting_breakpoint;
124123

125124
struct task_struct *kgdb_usethread;
@@ -1084,31 +1083,6 @@ static void kgdb_unregister_callbacks(void)
10841083
}
10851084
}
10861085

1087-
/*
1088-
* There are times a tasklet needs to be used vs a compiled in
1089-
* break point so as to cause an exception outside a kgdb I/O module,
1090-
* such as is the case with kgdboe, where calling a breakpoint in the
1091-
* I/O driver itself would be fatal.
1092-
*/
1093-
static void kgdb_tasklet_bpt(unsigned long ing)
1094-
{
1095-
kgdb_breakpoint();
1096-
atomic_set(&kgdb_break_tasklet_var, 0);
1097-
}
1098-
1099-
static DECLARE_TASKLET_OLD(kgdb_tasklet_breakpoint, kgdb_tasklet_bpt);
1100-
1101-
void kgdb_schedule_breakpoint(void)
1102-
{
1103-
if (atomic_read(&kgdb_break_tasklet_var) ||
1104-
atomic_read(&kgdb_active) != -1 ||
1105-
atomic_read(&kgdb_setting_breakpoint))
1106-
return;
1107-
atomic_inc(&kgdb_break_tasklet_var);
1108-
tasklet_schedule(&kgdb_tasklet_breakpoint);
1109-
}
1110-
EXPORT_SYMBOL_GPL(kgdb_schedule_breakpoint);
1111-
11121086
/**
11131087
* kgdb_register_io_module - register KGDB IO module
11141088
* @new_dbg_io_ops: the io ops vector

0 commit comments

Comments
 (0)