[PATCH v4 1/4] mm: modify pte format for Svnapot
Conor.Dooley at microchip.com
Conor.Dooley at microchip.com
Mon Aug 22 13:56:11 PDT 2022
On 22/08/2022 16:34, panqinglin2020 at iscas.ac.cn wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> 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>
>
> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> index ed66c31e4655..c43708ae7f38 100644
> --- a/arch/riscv/Kconfig
> +++ b/arch/riscv/Kconfig
> @@ -432,6 +432,13 @@ config FPU
>
> If you don't know what to do here, say Y.
>
> +config SVNAPOT
One more, CONFIG_RISCV_ISA_SVNAPOT to match the others?
> + bool "Svnapot support"
> + default n
> + help
> + Select if your CPU supports Svnapot and you want to enable it when
> + kernel is booting.
> +
More information about the linux-riscv
mailing list