[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAGQJe6pDaWVy9a70_4beoyLJbrL13zd--HGFqJAzW7Sgjttpug@mail.gmail.com>
Date: Wed, 25 Dec 2024 09:29:48 +0100
From: Aleksandar Rikalo <arikalo@...il.com>
To: Conor Dooley <conor@...nel.org>
Cc: linux-riscv@...ts.infradead.org, Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>, Albert Ou <aou@...s.berkeley.edu>,
Will Deacon <will@...nel.org>, Peter Zijlstra <peterz@...radead.org>,
Boqun Feng <boqun.feng@...il.com>, Mark Rutland <mark.rutland@....com>,
Yury Norov <yury.norov@...il.com>, Rasmus Villemoes <linux@...musvillemoes.dk>,
Andrea Parri <parri.andrea@...il.com>, Leonardo Bras <leobras@...hat.com>, Guo Ren <guoren@...nel.org>,
Samuel Holland <samuel.holland@...ive.com>, Eric Chan <ericchancf@...gle.com>,
linux-kernel@...r.kernel.org,
Djordje Todorovic <djordje.todorovic@...cgroup.com>
Subject: Re: [PATCH] riscv: Rewrite AMO instructions via lr and sc.
On Fri, Nov 29, 2024 at 5:29 PM Conor Dooley <conor@...nel.org> wrote:
> On Fri, Nov 29, 2024 at 03:43:19PM +0100, Aleksandar Rikalo wrote:
> > --- a/arch/riscv/Kconfig
> > +++ b/arch/riscv/Kconfig
> > @@ -715,6 +715,16 @@ config RISCV_ISA_ZACAS
> >
> > If you don't know what to do here, say Y.
> >
> > +config RISCV_ISA_ZALRSC_ONLY
> > + bool "Zalrsc extension support only"
>
> I don't agree with the naming of and description for this option.
> From the description below I'd imagine that you only care about a
> platform where use of AMO instructions is only undesirable, but overall
> the option implies that it can be used to build a kernel that can be
> used on systems that only implement Zalrsc, which, even with your patch
> applied, it cannot. I think, if we are going to merge something like this,
> we should go the whole way and permit platforms that don't even emulate
> the a extension. If not, the Kconfig option should be explicitly clear
> that the a extension is still mandatory.
> Since you mention trap handlers here, it sounds like it may not be the
> CPU itself that emulates it, but rather firmware?
Hello,
We can forget about emulation for now. This patch only affects the way
the kernel implements atomic functions. It's needed for MIPS p8700.
I've changed the description in v2:
https://lore.kernel.org/linux-riscv/20241225082412.36727-1-arikalo@gmail.com
Best Regards,
Aleksandar
Powered by blists - more mailing lists