OSDN Git Service

riscv/mm/fault: Set FAULT_FLAG_INSTRUCTION flag in do_page_fault()
authorPekka Enberg <penberg@kernel.org>
Sat, 5 Sep 2020 06:07:26 +0000 (09:07 +0300)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Wed, 16 Sep 2020 01:46:11 +0000 (18:46 -0700)
commita960c1323749383e62b67f5d49cdfbdcccde0ef6
treee5a22bc2e128c39fa297d6052b42494c7672c9c8
parent2baa6d9506f24d52f53317f60ccbcdbb2c4f4c40
riscv/mm/fault: Set FAULT_FLAG_INSTRUCTION flag in do_page_fault()

If the page fault "cause" is EXC_INST_PAGE_FAULT, set the
FAULT_FLAG_INSTRUCTION flag to let handle_mm_fault() and friends know
about it. This has no functional changes because RISC-V uses the default
arch_vma_access_permitted() implementation, which always returns true.
However, dax_pmd_fault(), for example, has a tracepoint that uses
FAULT_FLAG_INSTRUCTION, so we might as well set it.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/mm/fault.c