Skip to contentSkip to conversation

kgdb: use new API for breakpoint tasklet

PATCH In review Emil Renner Berthing 2 participants 3 messages Jan 23, 2021 – Jan 26, 2021 KGDB / KDB /debug_core

lore
Share & tools
lore
#0 lore raw

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
index af6e8b4fb359..98d44c2bb0a4 100644
@@ -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
#1 lore raw
Quoted 6 lines · Emil Renner Berthing

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().

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
---
 kernel/debug/debug_core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/debug/debug_core.c +2 -2
index af6e8b4fb359..98d44c2bb0a4 100644
@@ -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
#2 lore raw
Quoted 5 lines · Daniel Thompson
Quoted 3 lines · Emil Renner Berthing

This converts the kgdb_tasklet_breakpoint to use the new API in commit 12cc923f1ccc ("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 than DECLARE_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
---
 kernel/debug/debug_core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/debug/debug_core.c +2 -3
index af6e8b4fb359..98d44c2bb0a4 100644
@@ -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