linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Daniel Bristot de Oliveira <bristot@kernel.org>,
	"Luis Claudio R. Goncalves" <lgoncalv@redhat.com>,
	Neeraj Upadhyay <neeraj.upadhyay@kernel.org>,
	Valentin Schneider <vschneid@redhat.com>,
	linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH] tracing/timerlat: move interface_lock definition up
Date: Mon, 9 Sep 2024 11:21:27 -0400	[thread overview]
Message-ID: <20240909112127.6f2ea6e9@gandalf.local.home> (raw)
In-Reply-To: <20240909135344.76327-1-arnd@kernel.org>

On Mon,  9 Sep 2024 13:53:20 +0000
Arnd Bergmann <arnd@kernel.org> wrote:

> From: Arnd Bergmann <arnd@arndb.de>
> 
> The definition was previously moved into an #ifdef block by
> accident and now causes a build failure when CONFIG_TIMERLAT_TRACER
> is disabled:
> 
> In file included from include/linux/seqlock.h:19,
>                  from kernel/trace/trace_osnoise.c:20:
> kernel/trace/trace_osnoise.c: In function 'osnoise_sleep':
> kernel/trace/trace_osnoise.c:1631:21: error: 'interface_lock' undeclared (first use in this function); did you mean 'trace_clock'?
>  1631 |         mutex_lock(&interface_lock);
>       |                     ^~~~~~~~~~~~~~
> 
> Move it up some more to be outside of that #ifdef again.

Thanks, but for some reason I never got your email. I only noticed this
from Patchwork, and I'm replying via lore.

I also fixed it due to someone else reporting the bug. I'm currently
running mine through my tests, although it is the exact same change as yours.

  https://lore.kernel.org/linux-trace-kernel/20240909103231.23a289e2@gandalf.local.home/

-- Steve


> 
> Fixes: e6a53481da29 ("tracing/timerlat: Only clear timer if a kthread exists")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> It looks like the regression already made it into 6.11-rc7 as
> part of
> https://lore.kernel.org/lkml/20240905172827.6a64cf97@gandalf.local.home/
> so this fixup (if correct) is needed for 6.11 as well
> ---
>  kernel/trace/trace_osnoise.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/kernel/trace/trace_osnoise.c b/kernel/trace/trace_osnoise.c
> index 20c6660762a3..acfd57689af6 100644
> --- a/kernel/trace/trace_osnoise.c
> +++ b/kernel/trace/trace_osnoise.c
> @@ -228,6 +228,11 @@ static inline struct osnoise_variables *this_cpu_osn_var(void)
>  	return this_cpu_ptr(&per_cpu_osnoise_var);
>  }
>  
> +/*
> + * Protect the interface.
> + */
> +static struct mutex interface_lock;
> +
>  #ifdef CONFIG_TIMERLAT_TRACER
>  /*
>   * Runtime information for the timer mode.
> @@ -252,11 +257,6 @@ static inline struct timerlat_variables *this_cpu_tmr_var(void)
>  	return this_cpu_ptr(&per_cpu_timerlat_var);
>  }
>  
> -/*
> - * Protect the interface.
> - */
> -static struct mutex interface_lock;
> -
>  /*
>   * tlat_var_reset - Reset the values of the given timerlat_variables
>   */


      reply	other threads:[~2024-09-09 15:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-09 13:53 [PATCH] tracing/timerlat: move interface_lock definition up Arnd Bergmann
2024-09-09 15:21 ` Steven Rostedt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240909112127.6f2ea6e9@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=bristot@kernel.org \
    --cc=lgoncalv@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=neeraj.upadhyay@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=vschneid@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).