[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b0c39a9895698d74e2f44eb1f2faed46eee54bc3.camel@wdc.com>
Date: Tue, 1 Oct 2019 08:22:37 +0000
From: Atish Patra <Atish.Patra@....com>
To: "hch@...radead.org" <hch@...radead.org>
CC: "anup@...infault.org" <anup@...infault.org>,
"paul.walmsley@...ive.com" <paul.walmsley@...ive.com>,
"linux-riscv@...ts.infradead.org" <linux-riscv@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"palmer@...ive.com" <palmer@...ive.com>,
"aou@...s.berkeley.edu" <aou@...s.berkeley.edu>,
"johan@...nel.org" <johan@...nel.org>
Subject: Re: [v6 PATCH] RISC-V: Remove unsupported isa string info print
On Tue, 2019-10-01 at 00:02 -0700, Christoph Hellwig wrote:
> On Mon, Sep 30, 2019 at 05:23:18PM -0700, Atish Patra wrote:
> > /proc/cpuinfo should just print all the isa string as an
> > information
> > instead of determining what is supported or not. ELF hwcap can be
> > used by the userspace to figure out that.
> >
> > Simplify the isa string printing by removing the unsupported isa
> > string
> > print and all related code.
> >
> > The relevant discussion can be found at
> > http://lists.infradead.org/pipermail/linux-riscv/2019-September/006702.html
>
> This looks good, but can you also rename the orig_isa argument to isa
> now that we never modify it?
>
Sure. I will do that.
> > /*
> > * Linux doesn't support rv32e or rv128i, and we only support
> > booting
> > * kernels on harts with the same ISA that the kernel is
> > compiled for.
> > */
> > #if defined(CONFIG_32BIT)
> > - if (strncmp(isa, "rv32i", 5) != 0)
> > + if (strncmp(orig_isa, "rv32i", 5) != 0)
> > return;
> > #elif defined(CONFIG_64BIT)
> > - if (strncmp(isa, "rv64i", 5) != 0)
> > + if (strncmp(orig_isa, "rv64i", 5) != 0)
> > return;
> > #endif
>
> And I don't think having these checks here makes much sense.
Correct. As we are dumping the isa information as it is, we should get
rid of these checks as well.
> If we want
> to check this at all we should do it somewhere in the boot process.
riscv_of_processor_hartid() or seems to be a better candidate. We
already check if "rv" is present in isa string or not. I will extend
that to check for rv64i or rv32i. Is that okay ?
--
Regards,
Atish
Powered by blists - more mailing lists