linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Atish Patra <Atish.Patra@wdc.com>
To: "hch@infradead.org" <hch@infradead.org>
Cc: "aou@eecs.berkeley.edu" <aou@eecs.berkeley.edu>,
	"anup@brainfault.org" <anup@brainfault.org>,
	"palmer@sifive.com" <palmer@sifive.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"johan@kernel.org" <johan@kernel.org>,
	"paul.walmsley@sifive.com" <paul.walmsley@sifive.com>,
	"linux-riscv@lists.infradead.org"
	<linux-riscv@lists.infradead.org>
Subject: Re: [v5 PATCH] RISC-V: Fix unsupported isa string info.
Date: Fri, 16 Aug 2019 19:21:52 +0000	[thread overview]
Message-ID: <3fb8d4f0383b005ecd932a69c4dd295a79b6fb1a.camel@wdc.com> (raw)
In-Reply-To: <20190812150215.GF26897@infradead.org>

On Mon, 2019-08-12 at 08:02 -0700, Christoph Hellwig wrote:
> > +	for (e = mandatory_ext; *e != '\0'; ++e) {
> > +		if (isa[0] != e[0]) {
> > +#if defined(CONFIG_FP)
> > +			if ((isa[0] == 'f') || (isa[0] == 'd'))
> > +				continue;
> > +#endif
> > +			unsupported_isa[index] = e[0];
> > +			index++;
> > +		}
> 
> I'd just use if (IS_ENABLED()) here to get full compiler coverage.
> Also no need for the inner braces.
> 

Sure. I will do that.

> > +	if (isa[0] != '\0') {
> > +		/* Add remainging isa strings */
> > +		for (e = isa; *e != '\0'; ++e) {
> > +#if !defined(CONFIG_VIRTUALIZATION)
> > +			if (e[0] != 'h')
> > +#endif
> > +				seq_write(f, e, 1);
> > +		}
> > +	}
> 
> This one I don't get.  Why do we want to check CONFIG_VIRTUALIZATION?
> 

If CONFIG_VIRTUALIZATION is not enabled, it shouldn't print that
hypervisor extension "h" in isa extensions.

This can be extended to any other future extensions and related config.

> >  	seq_puts(f, "\n");ther you want to know if a specific extension
> > is enabled
> >  
> >  	/*
> >  	 * If we were given an unsupported ISA in the device tree then
> > print
> >  	 * a bit of info describing what went wrong.
> >  	 */
> > -	if (isa[0] != '\0')
> > -		pr_info("unsupported ISA \"%s\" in device tree\n",
> > orig_isa);
> > +	if (unsupported_isa[0])
> > +		pr_info("unsupported ISA extensions \"%s\" in device
> > tree for cpu [%ld]\n",
> > +			unsupported_isa, cpuid);
> 
> And I'm not even sure why we care about unsupported
> extensions.  Sooner
> or late a few will op up and they should be harmless.

This is just an information to the userspace that some of the mandatory
ISA extensions ("mafdcsu") are not supported in kernel which may lead
to undesirable results.


Regards,
Atish

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

  reply	other threads:[~2019-08-16 19:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-07 18:23 [v5 PATCH] RISC-V: Fix unsupported isa string info Atish Patra
2019-08-12 15:02 ` Christoph Hellwig
2019-08-16 19:21   ` Atish Patra [this message]
2019-08-18 18:16     ` hch
2019-08-20  7:59       ` Atish Patra
2019-09-06 23:27         ` Atish Patra
2019-09-10  6:00           ` hch
2019-09-13 20:47             ` Palmer Dabbelt
2019-09-14  4:07               ` Atish Patra
2019-08-19 10:15 ` Jacob Lifshay

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=3fb8d4f0383b005ecd932a69c4dd295a79b6fb1a.camel@wdc.com \
    --to=atish.patra@wdc.com \
    --cc=anup@brainfault.org \
    --cc=aou@eecs.berkeley.edu \
    --cc=hch@infradead.org \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@sifive.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;
as well as URLs for NNTP newsgroup(s).