summaryrefslogtreecommitdiffstats
path: root/arch/riscv/include/asm/pgtable.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2024-04-14 22:25:18 +0200
committerIngo Molnar <mingo@kernel.org>2024-04-14 22:25:18 +0200
commitd0331aa9789707140e938d14629c200b32ae1d0f (patch)
tree744a6b6d34f242e122bf78ca9f3a95c1548907a3 /arch/riscv/include/asm/pgtable.h
parentperf/bpf: Change the !CONFIG_BPF_SYSCALL stubs to static inlines (diff)
parentMerge tag 'pull-sysfs-annotation-fix' of git://git.kernel.org/pub/scm/linux/k... (diff)
downloadlinux-d0331aa9789707140e938d14629c200b32ae1d0f.tar.xz
linux-d0331aa9789707140e938d14629c200b32ae1d0f.zip
Merge branch 'linus' into perf/core, to pick up perf/urgent fixes
Pick up perf/urgent fixes that are upstream already, but not yet in the perf/core development branch. Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/riscv/include/asm/pgtable.h')
-rw-r--r--arch/riscv/include/asm/pgtable.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h
index 97fcde30e247..9f8ea0e33eb1 100644
--- a/arch/riscv/include/asm/pgtable.h
+++ b/arch/riscv/include/asm/pgtable.h
@@ -593,6 +593,12 @@ static inline int ptep_clear_flush_young(struct vm_area_struct *vma,
return ptep_test_and_clear_young(vma, address, ptep);
}
+#define pgprot_nx pgprot_nx
+static inline pgprot_t pgprot_nx(pgprot_t _prot)
+{
+ return __pgprot(pgprot_val(_prot) & ~_PAGE_EXEC);
+}
+
#define pgprot_noncached pgprot_noncached
static inline pgprot_t pgprot_noncached(pgprot_t _prot)
{