From: "Heiko Stübner" <heiko@sntech.de>
To: panqinglin2020@iscas.ac.cn, paul.walmsley@sifive.com,
palmer@dabbelt.com, aou@eecs.berkeley.edu,
linux-riscv@lists.infradead.org
Cc: jeff@riscv.org, xuyinan@ict.ac.cn, Alexandre ghiti <alex@ghiti.fr>
Subject: Re: [PATCH v1 1/2] riscv, mm: Add Sv57 support based on Sv48 implementation
Date: Mon, 29 Nov 2021 13:18:40 +0100 [thread overview]
Message-ID: <8716160.szTZlG9eok@diego> (raw)
In-Reply-To: <cda194e5-297d-5eb2-2dc2-7ce5fdf2fd60@ghiti.fr>
Am Montag, 29. November 2021, 12:20:20 CET schrieb Alexandre ghiti:
> Hi Qinglin,
>
> On 11/24/21 12:20, panqinglin2020@iscas.ac.cn wrote:
> > From: Qinglin Pan <panqinglin2020@iscas.ac.cn>
> >
> > This patch adds Sv57 implementation on the top of Alex's Sv48 patchset.
> > The mmu configuration will be determined on runtime, according to both
> > mmu HW support and mmu-type field in the dtb. The kernel will try to
> > set satp mode one by one from the configuration item to Sv39 in 64bit.
> >
> > Signed-off-by: Qinglin Pan <panqinglin2020@iscas.ac.cn>
> > @@ -658,18 +755,31 @@ static __init void set_satp_mode(uintptr_t dtb_pa)
> > continue;
> >
> > if (!strcmp(mmu_type, "riscv,sv39")) {
> > + disable_pgtable_l5();
> > disable_pgtable_l4();
> > return;
> > }
> >
> > + if (!strcmp(mmu_type, "riscv,sv48")) {
> > + check_l4 = true;
> > + }
> > +
>
>
> If sv48 is set in the device tree, why would you test if it is supported
> below? I would take it as is, just like for sv39, I'm not sure we want
> to override this silently and make a wrong device tree work.
or alternatively the code could emit a big WARN that a mismatch was
corrected. Getting to a point where a developer can actually see their
mistake on a console might be helpful to people :-)
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2021-11-29 12:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-24 11:20 [RESEND PATCH v1 0/2] Add Sv57 page table support panqinglin2020
2021-11-24 11:20 ` [PATCH v1 1/2] riscv, mm: Add Sv57 support based on Sv48 implementation panqinglin2020
2021-11-29 11:20 ` Alexandre ghiti
2021-11-29 12:18 ` Heiko Stübner [this message]
2021-11-30 3:11 ` 潘庆霖
2021-12-06 10:53 ` Alexandre ghiti
2021-11-24 11:20 ` [PATCH v1 2/2] Documentation, mm: Add Sv57 vm layout documentation panqinglin2020
2021-11-24 23:29 ` [RESEND PATCH v1 0/2] Add Sv57 page table support Heiko Stübner
-- strict thread matches above, loose matches on Subject: below --
2021-11-24 11:18 [PATCH " panqinglin2020
2021-11-24 11:18 ` [PATCH v1 1/2] riscv, mm: Add Sv57 support based on Sv48 implementation panqinglin2020
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=8716160.szTZlG9eok@diego \
--to=heiko@sntech.de \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=jeff@riscv.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=panqinglin2020@iscas.ac.cn \
--cc=paul.walmsley@sifive.com \
--cc=xuyinan@ict.ac.cn \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.