From: "Michael T. Kloos" <michael@michaelkloos.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Palmer Dabbelt <palmer@dabbelt.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
Albert Ou <aou@eecs.berkeley.edu>,
linux-riscv <linux-riscv@lists.infradead.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] riscv: Work to remove kernel dependence on the M-extension
Date: Wed, 9 Mar 2022 06:43:11 -0500 [thread overview]
Message-ID: <e936de26-95b7-1eed-008e-8d025b638265@michaelkloos.com> (raw)
In-Reply-To: <CAK8P3a2Mr_z6h7eg1O8ZN5_qE-o+8KFFBum3CxyuDYeF50s1dw@mail.gmail.com>
Thank you for your feedback. I don't really have much of an
opinion about that right now aside from that I know where things
are in the current structure and am comfortable. My goal with this
contribution was to keep it in-line with the current config
structure. Hence, I put it right next to the menuconfig option
to control CONFIG_RISCV_ISA_C under Platform Type.
I wouldn't necessarily be opposed to rethinking the way platform
feature selection is presented in menuconfig. If people feel that
most users will be looking for an rv64gc config and that it should
be made for clear, perhaps it could be done. I would need to do
more thinking about how exactly that would look.
I do think that it is outside the scope of this patch. Were you
working on something like that and worried about a merge conflict?
Michael
On 3/9/22 05:02, Arnd Bergmann wrote:
> On Wed, Mar 9, 2022 at 6:28 AM Michael T. Kloos
> <michael@michaelkloos.com> wrote:
>> Added a new config symbol RISCV_ISA_M to enable the usage of the
>> multiplication, division, and remainder (modulus) instructions
>> from the M-extension. This configures the march build flag to
>> either include or omit it.
>>
>> I didn't find any assembly using any of the instructions from
>> the M-extension. However, the BPF JIT is a complicating factor.
>> Currently, it emits M-extension instructions to implement various
>> BPF operations. For now, I have made HAVE_EBPF_JIT depend on
>> CONFIG_RISCV_ISA_M.
>>
>> I have added the supplementary integer arithmetic functions in
>> the file "arch/riscv/lib/ext_m_supplement.c". All the code
>> contained in this file is wrapped in an ifndef contingent on the
>> presence of CONFIG_RISCV_ISA_M.
>>
>> Signed-off-by: Michael T. Kloos <michael@michaelkloos.com>
> The patch looks fine to me, but I increasingly get the feeling that the
> entire platform feature selection in Kconfig should be guarded with
> a global flag that switches between "fully generic" and "fully custom"
> builds, where the generic kernel assumes that all the standard
> features (64-bit, C, M, FPU, MMU, UEFI, ...) are present, the
> incompatible options (XIP, PHYS_RAM_BASE_FIXED,
> CMDLINE_FORCE, BUILTIN_DTB, ...) are force-disabled,
> and all optional features (V/B/P/H extensions, custom instructions,
> platform specific device drivers, ...) are runtime detected.
>
> At the moment, those three types are listed at the same level,
> which gives the impression that they can be freely mixed.
>
> Arnd
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2022-03-09 11:45 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-09 5:28 [PATCH] riscv: Work to remove kernel dependence on the M-extension Michael T. Kloos
2022-03-09 10:02 ` Arnd Bergmann
2022-03-09 11:43 ` Michael T. Kloos [this message]
2022-03-09 11:47 ` Arnd Bergmann
2022-03-10 7:34 ` Palmer Dabbelt
2022-03-10 7:54 ` Arnd Bergmann
2022-03-10 17:09 ` Palmer Dabbelt
2022-04-02 10:18 ` Pavel Machek
2022-03-10 7:06 ` Christoph Hellwig
2022-03-10 7:34 ` Palmer Dabbelt
2022-03-10 8:04 ` Christoph Hellwig
2022-03-10 9:31 ` Michael T. Kloos
2022-03-10 13:22 ` Michael T. Kloos
2022-03-10 13:37 ` Michael T. Kloos
2022-03-11 4:29 ` Palmer Dabbelt
2022-03-11 4:54 ` Michael T. Kloos
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=e936de26-95b7-1eed-008e-8d025b638265@michaelkloos.com \
--to=michael@michaelkloos.com \
--cc=aou@eecs.berkeley.edu \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
/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