[RFC PATCH V4 1/6] riscv: pgtable: Add custom protection_map init
Christoph Hellwig
hch at lst.de
Wed Sep 15 00:45:57 PDT 2021
On Sat, Sep 11, 2021 at 05:21:34PM +0800, guoren at kernel.org wrote:
> From: Guo Ren <guoren at linux.alibaba.com>
>
> Some RISC-V CPU vendors have defined their own PTE attributes to
> solve non-coherent DMA bus problems. That makes _P/SXXX definitions
> contain global variables which could be initialized at the early
> boot stage before setup_vm. The patch prevents compile errors.
That sounds way to nice for someone who deliberatly ignores the
specification and should definitively not go into the kernel
commit log like this.
> This patch is similar to 316d097c4cd4 (x86/pti: Filter at
> vma->vm_page_prot population) which give a choice for arch custom
> implementation.
How? To me it looks like a bad duplication of such functionality in
a way that totally breaks abstractions. architectures really do not
have any business changing protection_map.
More information about the linux-riscv
mailing list