linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Palmer Dabbelt <palmer@sifive.com>
Cc: vincentc@andestech.com, aou@eecs.berkeley.edu,
	alankao@andestech.com, greentime@andestech.com,
	zong@andestech.com, linux-kernel@vger.kernel.org,
	Christoph Hellwig <hch@infradead.org>,
	kito@andestech.com, linux-riscv@lists.infradead.org,
	deanbo422@gmail.com
Subject: Re: [RFC 0/2] RISC-V: A proposal to add vendor-specific code
Date: Wed, 7 Nov 2018 10:51:11 +0100	[thread overview]
Message-ID: <CAK8P3a1He1B2UHLEinzuPF2WvDbt=gwmTkz7-XoMwvpHhBDiuA@mail.gmail.com> (raw)
Message-ID: <20181107095111.9Z27oJFi_7aC54s3vsA4eXRBm1tsu6fQqkdTifruNPA@z> (raw)
In-Reply-To: <mhng-19511b81-9f89-4a15-8b2f-d63779074fb4@palmer-si-x1c4>

On 11/7/18, Palmer Dabbelt <palmer@sifive.com> wrote:
> On Mon, 05 Nov 2018 00:52:52 PST (-0800), Arnd Bergmann wrote:
>> On 11/5/18, Christoph Hellwig <hch@infradead.org> wrote:
>>> On Mon, Nov 05, 2018 at 02:58:07PM +0800, Vincent Chen wrote:
>>>> Many thanks for kinds of comments. I quickly synthesize the comments
>>>> and
>>>> list them as below.
>>>> 1. The kernel image shall include all vendor-specific code.
>>>
>>> I fundamentally disagree with this… and think it should be the contrary.
>>>
>>> 1. The kernel shall support no vendor specific instructions whatsoever,
>>> period.
>>
>> I think what was meant above is
>>
>> 1. If a vendor extension requires kernel support, that support
>> must be able to be built into a kernel image without breaking support
>> for CPUs that do not have that extension, to allow building a single
>> kernel image that works on all CPUs.
>
> Yes.  I don't want anything that won't compile with upstream GCC, but I also
>
> don't want to have a Kconfig that says "make the kernel only work on
> $VENDOR's  implementation".  I think this can be achieved, at least for the
> cases I've seen so far.

I think over time, the implementations will diverge. Ignoring the question
of vendor extensions for the moment, you will definitely have to deal with
combinations of (future) standard extensions. I can see two ways of
doing that: Either each extension is a separate Kconfig option and you
have to know which one to enable or disable for a particular target,
or you list each platform separately with one Kconfig option, and
have Kconfig/Kbuild work out which features to enable or disable
based on that to get the fastest and most featureful kernel that still
works on all enabled platforms.

       Arnd

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  parent reply	other threads:[~2018-11-07  9:51 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-31 10:35 [RFC 0/2] RISC-V: A proposal to add vendor-specific code Vincent Chen
2018-10-31 10:35 ` Vincent Chen
2018-10-31 10:35 ` [RFC 1/2] RISC-V: An infrastructure " Vincent Chen
2018-10-31 10:35   ` Vincent Chen
2018-10-31 10:35 ` [RFC 2/2] RISC-V: make dma_map_ops work without cache coherent agent Vincent Chen
2018-10-31 10:35   ` Vincent Chen
2018-10-31 11:16 ` [RFC 0/2] RISC-V: A proposal to add vendor-specific code Anup Patel
2018-10-31 11:16   ` Anup Patel
2018-10-31 11:45   ` Arnd Bergmann
2018-10-31 11:45     ` Arnd Bergmann
2018-10-31 14:17   ` Christoph Hellwig
2018-10-31 14:17     ` Christoph Hellwig
2018-11-01  0:55     ` Alan Kao
2018-11-01  0:55       ` Alan Kao
2018-11-01 17:50       ` Palmer Dabbelt
2018-11-01 17:50         ` Palmer Dabbelt
2018-11-02  0:41         ` Alan Kao
2018-11-02  0:41           ` Alan Kao
2018-10-31 17:27   ` Palmer Dabbelt
2018-10-31 17:27     ` Palmer Dabbelt
2018-10-31 19:17     ` Olof Johansson
2018-10-31 19:17       ` Olof Johansson
2018-11-01 17:48     ` Karsten Merker
2018-11-05  6:58       ` Vincent Chen
2018-11-05  6:58         ` Vincent Chen
2018-11-05  7:05         ` Christoph Hellwig
2018-11-05  7:05           ` Christoph Hellwig
2018-11-05  8:52           ` Arnd Bergmann
2018-11-05  8:52             ` Arnd Bergmann
2018-11-05  9:08             ` Christoph Hellwig
2018-11-05  9:08               ` Christoph Hellwig
2018-11-05 13:51               ` Arnd Bergmann
2018-11-05 13:51                 ` Arnd Bergmann
2018-11-06  6:59                 ` Christoph Hellwig
2018-11-06  6:59                   ` Christoph Hellwig
2018-11-06 23:45             ` Palmer Dabbelt
2018-11-06 23:45               ` Palmer Dabbelt
2018-11-07  9:51               ` Arnd Bergmann [this message]
2018-11-07  9:51                 ` Arnd Bergmann
2018-11-06 23:45         ` Palmer Dabbelt
2018-11-06 23:45           ` Palmer Dabbelt
2018-11-08  2:43           ` Vincent Chen
2018-11-08  2:43             ` Vincent Chen
2018-11-05 19:39 ` Nick Kossifidis
2018-11-05 19:39   ` Nick Kossifidis
2018-11-06  6:56   ` Christoph Hellwig
2018-11-06  6:56     ` Christoph Hellwig

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='CAK8P3a1He1B2UHLEinzuPF2WvDbt=gwmTkz7-XoMwvpHhBDiuA@mail.gmail.com' \
    --to=arnd@arndb.de \
    --cc=alankao@andestech.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=deanbo422@gmail.com \
    --cc=greentime@andestech.com \
    --cc=hch@infradead.org \
    --cc=kito@andestech.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@sifive.com \
    --cc=vincentc@andestech.com \
    --cc=zong@andestech.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;
as well as URLs for NNTP newsgroup(s).