[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <da057e38-a3e1-42d8-8b7d-4e2dfed6d7b7@app.fastmail.com>
Date: Thu, 18 Jul 2024 11:35:33 +0200
From: "Arnd Bergmann" <arnd@...db.de>
To: "Conor.Dooley" <conor.dooley@...rochip.com>,
"Alexandre Ghiti" <alexghiti@...osinc.com>
Cc: "Andrew Jones" <ajones@...tanamicro.com>,
"Jonathan Corbet" <corbet@....net>,
"Paul Walmsley" <paul.walmsley@...ive.com>,
"Palmer Dabbelt" <palmer@...belt.com>, "Albert Ou" <aou@...s.berkeley.edu>,
"Conor Dooley" <conor@...nel.org>, "Rob Herring" <robh@...nel.org>,
"Krzysztof Kozlowski" <krzk+dt@...nel.org>,
"Andrea Parri" <parri.andrea@...il.com>,
"Nathan Chancellor" <nathan@...nel.org>,
"Peter Zijlstra" <peterz@...radead.org>, "Ingo Molnar" <mingo@...hat.com>,
"Will Deacon" <will@...nel.org>, "Waiman Long" <longman@...hat.com>,
"Boqun Feng" <boqun.feng@...il.com>, "Leonardo Bras" <leobras@...hat.com>,
guoren <guoren@...nel.org>, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-riscv@...ts.infradead.org,
Linux-Arch <linux-arch@...r.kernel.org>
Subject: Re: [PATCH v3 05/11] riscv: Implement arch_cmpxchg128() using Zacas
On Thu, Jul 18, 2024, at 10:33, Conor Dooley wrote:
> On Thu, Jul 18, 2024 at 09:48:42AM +0200, Alexandre Ghiti wrote:
>> On Wed, Jul 17, 2024 at 10:34 PM Andrew Jones <ajones@...tanamicro.com> wrote:
>> > On Wed, Jul 17, 2024 at 08:19:51AM GMT, Alexandre Ghiti wrote:
>> > > +
>> > > +union __u128_halves {
>> > > + u128 full;
>> > > + struct {
>> > > + u64 low, high;
>> >
>> > Should we consider big endian too?
>>
>> Should we care about big endian? We don't deal with big endian
>> anywhere in our kernel right now.
>
> There's one or two places I think that we do actually have some
> conditional stuff for BE. The Zbb string routines I believe is one such
> place, and maybe there are one or two others. In general I'm not of the
> opinion that it is worth adding complexity for BE until there's
> linux-capable hardware that supports it (so not QEMU or people's toy
> implementations), unless it's something that userspace is able to see.
I don't think you want to go there at all: maintaining an
extra user space ABI (or two if you add 32-bit BE as well)
has a huge long-term cost, and there is pretty much zero
benefit for a BE ABI these days.
Adding it to arm64 turned out to be a mistake. We did have
a handful of users in the first year, and it technically
still works, but I don't think there are any users left
after they managed to fix their nonportable legacy
userspace from that was ported from big-endian mips or
powerpc.
Arnd
Powered by blists - more mailing lists