mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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: Wed, 28 Aug 2024 13:48:41 +0000	[thread overview]
Message-ID: <b3512703-bab3-4999-ac20-b1b874fcfcc3@app.fastmail.com> (raw)
In-Reply-To: <3ca4590a-8256-42d1-89ca-f337ae6f755c@paulmck-laptop>

On Wed, Aug 28, 2024, at 13:11, Paul E. McKenney wrote:
> Hello, Arnd,
>
> You know how it goes, give them an inch...
>
> I did get a request for 16-bit xchg(), but last I checked, Linux still
> supports some systems that do not have 16-bit store instructions.
>
> Could you please let me know whether this is still the case?

Hi Paul,

The only one I'm aware of that can't do it easily
is a configuration on 32-bit ARM that enables both 
CONFIG_CPU_V6 and CONFIG_SMP, but I already wrote
a patch that forbids that configuration for other
reasons. I just need to send that patch.

There is a related problem with ARM RiscPC, which
uses a kernel built with -march=armv3, and that
disallows 16-bit load/store instructions entirely,
similar to how alpha ev5 and earlier lacked both
byte and word access.

Everything else that I see has native load/store
on 16-bit words and either has 16-bit atomics or
can emulate them using the 32-bit ones.

However, the one thing that people usually
want 16-bit xchg() for is qspinlock, and that
one not only depends on it being atomic but also
on strict forward-progress guarantees, which
I think the emulated version can't provide
in general.

This does not prevent architectures from doing
it anyway.

      Arnd

  reply	other threads:[~2024-08-28 13:49 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 [this message]
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
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=b3512703-bab3-4999-ac20-b1b874fcfcc3@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®