[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wiKooX5vOu6TgGPEwdX--k0DyE4ntJDU4QzbVFMWGVXFw@mail.gmail.com>
Date: Thu, 14 Dec 2023 11:46:55 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
Linux Trace Kernel <linux-trace-kernel@...r.kernel.org>, Masami Hiramatsu <mhiramat@...nel.org>,
Mark Rutland <mark.rutland@....com>, Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Linux Arch <linux-arch@...r.kernel.org>
Subject: Re: [PATCH v3] ring-buffer: Remove 32bit timestamp logic
On Thu, 14 Dec 2023 at 09:53, Steven Rostedt <rostedt@...dmis.org> wrote:
>
> + /*
> + * For architectures that can not do cmpxchg() in NMI, or require
> + * disabling interrupts to do 64-bit cmpxchg(), do not allow them
> + * to record in NMI context.
> + */
> + if ((!IS_ENABLED(CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG) ||
> + (IS_ENABLED(CONFIG_X86_32) && !IS_ENABLED(CONFIG_X86_CMPXCHG64))) &&
> + unlikely(in_nmi())) {
> + return NULL;
> + }
Again, this is COMPLETE GARBAGE.
You're using "ARCH_HAVE_NMI_SAFE_CMPXCHG" to test something that just
isn't what it's about.
Having a NMI-safe cmpxchg does *not* mean that you actualyl have a
NMI-safe 64-bit version.
You can't test it that way.
Stop making random changes that just happen to work on the one machine
you tested it on.
Linus
Powered by blists - more mailing lists