kgdb: use new API for breakpoint tasklet
PATCH 1/1 kgdb: use new API for breakpoint tasklet
This converts the kgdb_tasklet_breakpoint to use the new API in commit 12cc923f1ccc ("tasklet: Introduce new initialization API")
The new API changes the argument passed to the callback function, but fortunately the argument isn't used so it is straight forward to use DECLARE_TASKLET() rather than DECLARE_TASKLET_OLD().
--- kernel/debug/debug_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/debug/debug_core.c +2 -2
@@ -1090,13 +1090,13 @@ static void kgdb_unregister_callbacks(void)* 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) +static void kgdb_tasklet_bpt (struct tasklet_struct *unused) {kgdb_breakpoint ();atomic_set (&kgdb_break_tasklet_var,0 ); } -static DECLARE_TASKLET_OLD(kgdb_tasklet_breakpoint, kgdb_tasklet_bpt); +static DECLARE_TASKLET(kgdb_tasklet_breakpoint, kgdb_tasklet_bpt);void kgdb_schedule_breakpoint (void ) {
Signature · 1 line
2.30.0
Quoted 6 lines · Emil Renner Berthing
This converts the
kgdb_tasklet_breakpointto use the new API in commit12cc923f1ccc("tasklet: Introduce new initialization API")The new API changes the argument passed to the callback function, but fortunately the argument isn't used so it is straight forward to use
DECLARE_TASKLET()rather thanDECLARE_TASKLET_OLD().
This patch overlaps with a more ambitious patch from Davidlohr. Perhaps you can join in with the other thread since the discussion there is unresolved. See:
https://lkml.org/lkml/2021/1/14/1320
Daniel.
Quoted 29 lines
Signed-off-by Emil Renner Berthing <[email protected]>--- kernel/debug/debug_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)kernel/debug/debug_core.c +2
-2@@ -1090,13 +1090,13 @@ static void kgdb_unregister_callbacks(void)* 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) +static void kgdb_tasklet_bpt (struct tasklet_struct *unused) {kgdb_breakpoint ();atomic_set (&kgdb_break_tasklet_var,0 ); } -static DECLARE_TASKLET_OLD(kgdb_tasklet_breakpoint, kgdb_tasklet_bpt); +static DECLARE_TASKLET(kgdb_tasklet_breakpoint, kgdb_tasklet_bpt);void kgdb_schedule_breakpoint (void ) {Signature · 1 line
2.30.0
Quoted 5 lines · Daniel Thompson
Quoted 3 lines · Emil Renner Berthing
This converts the
kgdb_tasklet_breakpointto use the new API in commit12cc923f1ccc("tasklet: Introduce new initialization API")
Quoted 8 lines
Quoted 3 lines
The new API changes the argument passed to the callback function, but fortunately the argument isn't used so it is straight forward to use
DECLARE_TASKLET()rather thanDECLARE_TASKLET_OLD().This patch overlaps with a more ambitious patch from Davidlohr. Perhaps you can join in with the other thread since the discussion there is unresolved. See:
https://lkml.org/lkml/2021/1/14/1320
Ah, that's cool. Getting rid of tasklets is much better than merely trying to get rid of the old tasklet API. Please ignore this patch then.
/Emil
Quoted 33 lines
Daniel.
Quoted 29 lines
Signed-off-by Emil Renner Berthing <[email protected]>--- kernel/debug/debug_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)kernel/debug/debug_core.c +2
-3@@ -1090,13 +1090,13 @@ static void kgdb_unregister_callbacks(void)* 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) +static void kgdb_tasklet_bpt (struct tasklet_struct *unused) {kgdb_breakpoint ();atomic_set (&kgdb_break_tasklet_var,0 ); } -static DECLARE_TASKLET_OLD(kgdb_tasklet_breakpoint, kgdb_tasklet_bpt); +static DECLARE_TASKLET(kgdb_tasklet_breakpoint, kgdb_tasklet_bpt);void kgdb_schedule_breakpoint (void ) { --2.30.0