public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kgdb: use new API for breakpoint tasklet
@ 2021-01-23 18:42 Emil Renner Berthing
  2021-01-25 11:03 ` Daniel Thompson
  0 siblings, 1 reply; 3+ messages in thread
From: Emil Renner Berthing @ 2021-01-23 18:42 UTC (permalink / raw)
  To: kgdb-bugreport
  Cc: Emil Renner Berthing, Jason Wessel, Daniel Thompson,
	Douglas Anderson, linux-kernel

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

Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
---
 kernel/debug/debug_core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/debug/debug_core.c b/kernel/debug/debug_core.c
index af6e8b4fb359..98d44c2bb0a4 100644
--- a/kernel/debug/debug_core.c
+++ b/kernel/debug/debug_core.c
@@ -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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] kgdb: use new API for breakpoint tasklet
  2021-01-23 18:42 [PATCH] kgdb: use new API for breakpoint tasklet Emil Renner Berthing
@ 2021-01-25 11:03 ` Daniel Thompson
  2021-01-25 11:25   ` Emil Renner Berthing
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Thompson @ 2021-01-25 11:03 UTC (permalink / raw)
  To: Emil Renner Berthing
  Cc: kgdb-bugreport, Jason Wessel, Douglas Anderson, linux-kernel,
	Davidlohr Bueso

On Sat, Jan 23, 2021 at 07:42:37PM +0100, Emil Renner Berthing wrote:
> 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.


> 
> Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
> ---
>  kernel/debug/debug_core.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/debug/debug_core.c b/kernel/debug/debug_core.c
> index af6e8b4fb359..98d44c2bb0a4 100644
> --- a/kernel/debug/debug_core.c
> +++ b/kernel/debug/debug_core.c
> @@ -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
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] kgdb: use new API for breakpoint tasklet
  2021-01-25 11:03 ` Daniel Thompson
@ 2021-01-25 11:25   ` Emil Renner Berthing
  0 siblings, 0 replies; 3+ messages in thread
From: Emil Renner Berthing @ 2021-01-25 11:25 UTC (permalink / raw)
  To: Daniel Thompson
  Cc: kgdb-bugreport, Jason Wessel, Douglas Anderson,
	Linux Kernel Mailing List, Davidlohr Bueso

On Mon, 25 Jan 2021 at 12:03, Daniel Thompson
<daniel.thompson@linaro.org> wrote:
>
> On Sat, Jan 23, 2021 at 07:42:37PM +0100, Emil Renner Berthing wrote:
> > 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

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
>
> Daniel.
>
>
> >
> > Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
> > ---
> >  kernel/debug/debug_core.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/kernel/debug/debug_core.c b/kernel/debug/debug_core.c
> > index af6e8b4fb359..98d44c2bb0a4 100644
> > --- a/kernel/debug/debug_core.c
> > +++ b/kernel/debug/debug_core.c
> > @@ -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
> >

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-01-26  6:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-23 18:42 [PATCH] kgdb: use new API for breakpoint tasklet Emil Renner Berthing
2021-01-25 11:03 ` Daniel Thompson
2021-01-25 11:25   ` Emil Renner Berthing

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox