aboutsummaryrefslogtreecommitdiff
path: root/arch/riscv/mm
diff options
context:
space:
mode:
authorGravatar Palmer Dabbelt <palmer@rivosinc.com> 2023-03-23 08:47:05 -0700
committerGravatar Palmer Dabbelt <palmer@rivosinc.com> 2023-03-24 13:34:43 -0700
commite45d6a52fe2b0df9b8e22e52c6c441902201920e (patch)
tree4498c7fc3d99d542af28d80d98070f3f0567afcc /arch/riscv/mm
parentMerge patch series "RISC-V: Apply Zicboz to clear_page" (diff)
parentriscv: entry: Consolidate general regs saving/restoring (diff)
downloadlinux-e45d6a52fe2b0df9b8e22e52c6c441902201920e.tar.gz
linux-e45d6a52fe2b0df9b8e22e52c6c441902201920e.tar.bz2
linux-e45d6a52fe2b0df9b8e22e52c6c441902201920e.zip
Merge patch series "riscv: Add GENERIC_ENTRY support"
guoren@kernel.org <guoren@kernel.org> says: From: Guo Ren <guoren@linux.alibaba.com> The patches convert riscv to use the generic entry infrastructure from kernel/entry/*. Some optimization for entry.S with new .macro and merge ret_from_kernel_thread into ret_from_fork. * b4-shazam-merge: riscv: entry: Consolidate general regs saving/restoring riscv: entry: Consolidate ret_from_kernel_thread into ret_from_fork riscv: entry: Remove extra level wrappers of trace_hardirqs_{on,off} riscv: entry: Convert to generic entry riscv: entry: Add noinstr to prevent instrumentation inserted riscv: ptrace: Remove duplicate operation Link: https://lore.kernel.org/r/20230222033021.983168-1-guoren@kernel.org Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'arch/riscv/mm')
-rw-r--r--arch/riscv/mm/fault.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/riscv/mm/fault.c b/arch/riscv/mm/fault.c
index 460f785f6e09..3aba72ec1742 100644
--- a/arch/riscv/mm/fault.c
+++ b/arch/riscv/mm/fault.c
@@ -15,6 +15,7 @@
#include <linux/uaccess.h>
#include <linux/kprobes.h>
#include <linux/kfence.h>
+#include <linux/entry-common.h>
#include <asm/ptrace.h>
#include <asm/tlbflush.h>
@@ -204,7 +205,7 @@ static inline bool access_error(unsigned long cause, struct vm_area_struct *vma)
* This routine handles page faults. It determines the address and the
* problem, and then passes it off to one of the appropriate routines.
*/
-asmlinkage void do_page_fault(struct pt_regs *regs)
+void handle_page_fault(struct pt_regs *regs)
{
struct task_struct *tsk;
struct vm_area_struct *vma;
@@ -251,7 +252,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs)
}
#endif
/* Enable interrupts if they were enabled in the parent context. */
- if (likely(regs->status & SR_PIE))
+ if (!regs_irqs_disabled(regs))
local_irq_enable();
/*
@@ -356,4 +357,3 @@ good_area:
}
return;
}
-NOKPROBE_SYMBOL(do_page_fault);