git: 8803e789393c - main - arm64: Stop setting x0 for pcb_onfault handlers

From: Andrew Turner <andrew_at_FreeBSD.org>
Date: Tue, 15 Oct 2024 17:25:16 UTC
The branch main has been updated by andrew:

URL: https://cgit.FreeBSD.org/src/commit/?id=8803e789393c504cafedb478a1619aab363c2aa5

commit 8803e789393c504cafedb478a1619aab363c2aa5
Author:     Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2024-10-14 14:36:05 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2024-10-15 17:24:42 +0000

    arm64: Stop setting x0 for pcb_onfault handlers
    
    All handlers set x0 before returning, there is no need to also do so
    in the data abort exception handler.
    
    Reviewed by:    markj
    Sponsored by:   Arm Ltd
    Differential Revision:  https://reviews.freebsd.org/D46814
---
 sys/arm64/arm64/trap.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sys/arm64/arm64/trap.c b/sys/arm64/arm64/trap.c
index fa0b46111a34..fa1132305067 100644
--- a/sys/arm64/arm64/trap.c
+++ b/sys/arm64/arm64/trap.c
@@ -375,7 +375,6 @@ data_abort(struct thread *td, struct trapframe *frame, uint64_t esr,
 bad_far:
 			if (td->td_intr_nesting_level == 0 &&
 			    pcb->pcb_onfault != 0) {
-				frame->tf_x[0] = error;
 				frame->tf_elr = pcb->pcb_onfault;
 				return;
 			}