[PATCH v5 1/4] mm: modify pte format for Svnapot
Heiko Stübner
heiko at sntech.de
Wed Oct 5 02:52:50 PDT 2022
Am Dienstag, 4. Oktober 2022, 20:33:05 CEST schrieb Conor Dooley:
> On Tue, Oct 04, 2022 at 07:00:27PM +0200, Andrew Jones wrote:
> > On Mon, Oct 03, 2022 at 09:47:18PM +0800, panqinglin2020 at iscas.ac.cn wrote:
> > > From: Qinglin Pan <panqinglin2020 at iscas.ac.cn>
> > >
> > > This commit adds two erratas to enable/disable svnapot support, patches
> > > code dynamicly when "svnapot" is in the "riscv,isa" field of fdt and
> > > SVNAPOT compile option is set. It will influence the behavior of
> > > has_svnapot function and pte_pfn function. All code dependent on svnapot
> > > should make sure that has_svnapot return true firstly.
> > >
> > > Also, this commit modifies PTE definition for Svnapot, and creates some
> > > functions in pgtable.h to mark a PTE as napot and check if it is a Svnapot
> > > PTE. Until now, only 64KB napot size is supported in draft spec, so some
> > > macros has only 64KB version.
> > >
> > > Signed-off-by: Qinglin Pan <panqinglin2020 at iscas.ac.cn>
[...]
> > > + switch (stage) {
> > > + case RISCV_ALTERNATIVES_EARLY_BOOT:
> > > + return false;
> > > + default:
> > > + return riscv_isa_extension_available(NULL, SVNAPOT);
> > > + }
> > > +#endif
> > > +
> > > + return false;
> > > +}
> > > +
> > > /*
> > > * Probe presence of individual extensions.
> > > *
> > > @@ -301,6 +316,9 @@ static u32 __init_or_module cpufeature_probe(unsigned int stage)
> > > if (cpufeature_probe_zicbom(stage))
> > > cpu_req_feature |= (1U << CPUFEATURE_ZICBOM);
>
> While in the area, could this be converted to BIT(CPUFEATURE_ZICBOM)?
It already is [0], although it looks like I need to ping Palmer about
that series.
Heiko
[0] https://lore.kernel.org/all/20220905111027.2463297-5-heiko@sntech.de/
More information about the linux-riscv
mailing list