Messages in this thread | | | Date | Sat, 08 Jun 2019 10:56:46 -0700 (PDT) | Subject | Re: [PATCH v3 1/5] arch: riscv: add support for building DTB files from DT source data | From | Palmer Dabbelt <> |
| |
On Thu, 06 Jun 2019 22:12:05 PDT (-0700), Paul Walmsley wrote: > On Tue, 4 Jun 2019, Loys Ollivier wrote: > >> Always build it ? >> Any particular reason to drop ARCH_SIFIVE ? > > Palmer had some reservations about it, so I dropped it for now. But then > as I was thinking about it, I remembered that I also had some reservations > about it, years ago: that everyone should use CONFIG_SOC_* for this, > rather than CONFIG_ARCH. CONFIG_ARCH_* seems better reserved for > CPU architectures.
Specifically my worry is that "ARCH_SIFIVE" makes it sound like we're adding SiFive-specific architecture features, and we've been trying really hard to make sure that the various bits of core software avoid boing vendor specific. We've had suggestions of adding vendor-specific instructions to the Linux port with those instructions being conditionally compiled under ARCH_$VENDOR, but I'd rejected that under the "no vendor-specific stuff" argument. As such it doesn't seem fair to go add in an ARCH_SIFIVE for our vendor-specific stuff.
The SOC stuff will, of course, be vendor specific. In this idealized world SiFive's SOC support has nothing to do with RISC-V, but of course all of SiFive's SOCs are RISC-V based so the separation is a bit of pedantry. That said, in this case I think getting the name right does make it slightly easier to espouse this "one kernel can run on all RISC-V systems" philosophy. Balancing the SiFive and RISC-V stuff can be a bit tricky, which is why I am sometimes a bit pedantic about these sorts of things.
> If you agree, would you like to send a followup series, based on the DT > patches, to make the SiFive DT file builds depend on CONFIG_SOC_* instead?
I'd be happy with something like that. We'd also talked about this selecting all the SiFive platform drivers. It should, of course, be possible to select multiple SOC vendors in a single kernel -- we don't have any other real hardware right now, but maybe some sort of "CONFIG_SOC_RISCV_VIRT" would be a good proof of concept?
> Thanks for the comment, > > - Paul
| |