[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231214160156.73e5ec51@gandalf.local.home>
Date: Thu, 14 Dec 2023 16:01:56 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: "linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>, 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>
Subject: Re: [PATCH] ring-buffer: Remove 32bit timestamp logic
On Thu, 14 Dec 2023 12:50:29 -0800
Linus Torvalds <torvalds@...ux-foundation.org> wrote:
> > But do all archs have an implementation of cmpxchg64, even if it requires
> > disabling interrupts? If not, then I definitely cannot remove this code.
>
> We have a generic header file, so anybody who uses that would get the
> fallback version, ie
>
> arch_cmpxchg64 -> generic_cmpxchg64_local -> __generic_cmpxchg64_local
>
> which does that irq disabling thing.
>
> But no, not everybody is guaranteed to use that fallback. From a quick
> look, ARC, hexagon and CSky don't do this, for example.
>
> And then I got bored and stopped looking.
>
> My guess is that *most* 32-bit architectures do not have a 64-bit
> cmpxchg - not even the irq-safe one.
OK, that means I have to completely abandon this change, even for the next
merge window.
I may add a check if cmpxchg64 exists before falling back to the 32bit
cmpxchg version. But even that will have to wait till the next merge
window, with a fixes tag (but not Cc'd stable) in case anyone would like to
backport it.
Thanks for the advice!
-- Steve
Powered by blists - more mailing lists