Re: [PATCH 6/7] riscv: mm: Always flush a single MM context by ASID

From: Palmer Dabbelt
Date: Thu Oct 26 2023 - 11:53:41 EST


On Sun, 10 Sep 2023 12:46:38 PDT (-0700), Conor Dooley wrote:
On Sat, Sep 09, 2023 at 03:16:34PM -0500, Samuel Holland wrote:
Even if ASIDs are not supported, using the single-ASID variant of the
sfence.vma instruction preserves TLB entries for global (kernel) pages.
So it is always most efficient to use the single-ASID code path.

Signed-off-by: Samuel Holland <samuel@xxxxxxxxxxxx>

On nommu:
arch/riscv/include/asm/tlbflush.h:59:69: error: 'mm_context_t' has no member named 'id'
arch/riscv/include/asm/tlbflush.h:61:9: error: implicit declaration of function 'local_flush_tlb_all_asid'; did you mean 'local_flush_tlb_all'? [-Werror=implicit-function-declaration]

I'm getting a few more build issues as well. One's over here https://lore.kernel.org/r/20231026145516.25866-1-palmer@xxxxxxxxxxxx , but I'm also getting

In file included from /scratch/merges/ko-linux-next/linux/arch/riscv/include/asm/pgalloc.h:11,
from /scratch/merges/ko-linux-next/linux/arch/riscv/include/asm/efi.h:13,
from /scratch/merges/ko-linux-next/linux/arch/riscv/kernel/setup.c:40:
/scratch/merges/ko-linux-next/linux/arch/riscv/include/asm/tlb.h: In function 'tlb_flush':
/scratch/merges/ko-linux-next/linux/arch/riscv/include/asm/tlb.h:18:9: error: implicit declaration of function 'flush_tlb_mm'; did you mean 'flush_tlb_all'? [-Werror=implicit-function-declaration]
18 | flush_tlb_mm(tlb->mm);
| ^~~~~~~~~~~~
| flush_tlb_all
/scratch/merges/ko-linux-next/linux/arch/riscv/include/asm/tlb.h:18:25: error: invalid use of undefined type 'struct mmu_gather'
18 | flush_tlb_mm(tlb->mm);
| ^~
cc1: some warnings being treated as errors


Cheers,
Conor.