Re: [PATCH] RISC-V: Allow the used to downgrade to sv48 when HW supports sv57

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 25, 2022 at 6:12 PM Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> wrote:
>
> Hi Palmer,.
>
> On Fri, Apr 22, 2022 at 11:42 PM Palmer Dabbelt <palmer@xxxxxxxxxxxx> wrote:
> > Similar to the previous patch, this allows a dt-selected downgrade to
> > sv48 on systems that support sv57 in case users don't need the extra VA
> > bits and want to save memory or improve performance.
> >
> > Signed-off-by: Palmer Dabbelt <palmer@xxxxxxxxxxxx>
> > ---
> > This is on top of the patches from Alex's set that I dropped.
>
> You mean "[PATCH v3 13/13] riscv: Allow user to downgrade to sv39
> when hw supports sv48 if !KASAN"?
> 20211206104657.433304-14-alexandre.ghiti@xxxxxxxxxxxxx
>
> For both: "DT describes hardware, not software policy"?

It is possible that HW is designed to support both Sv48 and Sv39 but
there is some errata due to which Sv48 does not work correctly ?

We should allow users to downgrade the MMU mode, due to
their own reasons. In fact, users can also disable an extension
by not showing it in the DT ISA string.

Regards,
Anup

>
> > --- a/arch/riscv/mm/init.c
> > +++ b/arch/riscv/mm/init.c
> > @@ -740,6 +740,11 @@ static __init void set_satp_mode(uintptr_t dtb_pa)
> >                         if (!mmu_type)
> >                                 continue;
> >
> > +                       if (!strcmp(mmu_type, "riscv,sv48")) {
> > +                               disable_pgtable_l5();
> > +                               return;
> > +                       }
> > +
> >                         if (!strcmp(mmu_type, "riscv,sv39")) {
> >                                 disable_pgtable_l5();
> >                                 disable_pgtable_l4();
>
> Gr{oetje,eeting}s,
>
>                         Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                 -- Linus Torvalds



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux