OSDN Git Service

riscv: mm: add _PAGE_LEAF macro
authorNanyong Sun <sunnanyong@huawei.com>
Fri, 30 Apr 2021 08:28:47 +0000 (16:28 +0800)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Sat, 22 May 2021 17:19:29 +0000 (10:19 -0700)
commitf5397c3ee0a3e2ca0a6d66d079ffcd5386b45b81
tree8372806f05bfd2b3cca7a2eef002302e0c3f04c8
parent6efb943b8616ec53a5e444193dccf1af9ad627b5
riscv: mm: add _PAGE_LEAF macro

In riscv, a page table entry is leaf when any bit of read, write,
or execute bit is set. So add a macro:_PAGE_LEAF instead of
(_PAGE_READ | _PAGE_WRITE | _PAGE_EXEC), which is frequently used
to determine if it is a leaf page. This make code easier to read,
without any functional change.

Signed-off-by: Nanyong Sun <sunnanyong@huawei.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/include/asm/pgtable-64.h
arch/riscv/include/asm/pgtable-bits.h
arch/riscv/include/asm/pgtable.h