From: "Arnd Bergmann" <arnd@arndb.de>
To: "Paul E. McKenney" <paulmck@kernel.org>
Cc: linux-kernel@vger.kernel.org, Linux-Arch <linux-arch@vger.kernel.org>
Subject: Re: 16-bit store instructions &c?
Date: Thu, 29 Aug 2024 21:56:52 +0200 [thread overview]
Message-ID: <f209bf4d-1d14-404b-8bff-8d6d2854d704@app.fastmail.com> (raw)
In-Reply-To: <1bb58d8d-4a2a-4728-a8f3-9295145dbbb0@paulmck-laptop>
On Thu, Aug 29, 2024, at 15:37, Paul E. McKenney wrote:
> My plan is to submit a pull request for the remaining three 8-bit
> cmpxchg() emulation commits into the upcoming merge window. In the
> meantime, I will create similar patches for 16-bit cmpxchg() and perhaps
> also both 8-bit and 16-bit xchg(). I will obviously CC both you and
> Russell on the full set. And if there are hardware-incompatibility
> complaints, we can deal with them, whether by dropping the offending
> pieces of my patches or by whatever other adjustments make sense.
>
> Does that seem like a reasonable approach, or is there a better way?
There is one thing I'd really like to see happen here, and that is
changing the architectures so they only define the fixed-length
__arch_xchg{8,16,32,64} and __arch_cmpxchg{8,16,32,64} helpers,
ideally as inline functions to have type checking on the pointer.
If we make the xchg()/cmpxchg() functiuons handle all sizes
across architectures, that just ends up cementing the type
agnostic macros, so I feel it would be better to have
fixed-size helpers as the generic API so we can phase out the
use of the existing macros on smaller-than-u32 arguments.
The macro is still needed to allow dealing with both integer
and pointer objects, as well as a mix of 'int' and 'long'
arguments on 64-bit, but for normal fixed-size objects I
think we can best use the same method as the current
xchg64()/cmpxchg64().
Arnd
next prev parent reply other threads:[~2024-08-29 19:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-28 13:11 Paul E. McKenney
2024-08-28 13:48 ` Arnd Bergmann
2024-08-28 14:22 ` Paul E. McKenney
2024-08-28 20:01 ` Arnd Bergmann
2024-08-29 13:37 ` Paul E. McKenney
2024-08-29 19:56 ` Arnd Bergmann [this message]
2024-09-03 22:34 ` Paul E. McKenney
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=f209bf4d-1d14-404b-8bff-8d6d2854d704@app.fastmail.com \
--to=arnd@arndb.de \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@kernel.org \
/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
all inboxes | Powered by JetHome®