The branch main has been updated by christos:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=3c6fb586b956798fbff8e9c50e7e3a7f204ba5f3

commit 3c6fb586b956798fbff8e9c50e7e3a7f204ba5f3
Author:     Christos Margiolis <[email protected]>
AuthorDate: 2023-05-22 20:03:06 +0000
Commit:     Christos Margiolis <[email protected]>
CommitDate: 2023-05-22 20:03:06 +0000

    riscv: do not duplicate sd of tp
    
    Reviewed by:    jhb
    Approved by:    markj (mentor)
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D39894
---
 sys/riscv/riscv/exception.S | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sys/riscv/riscv/exception.S b/sys/riscv/riscv/exception.S
index a68e7938e537..17b2038d4068 100644
--- a/sys/riscv/riscv/exception.S
+++ b/sys/riscv/riscv/exception.S
@@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$");
        addi    sp, sp, -(TF_SIZE)
 
        sd      ra, (TF_RA)(sp)
+       sd      tp, (TF_TP)(sp)
 
 .if \mode == 0 /* We came from userspace. */
        sd      gp, (TF_GP)(sp)
@@ -54,10 +55,7 @@ __FBSDID("$FreeBSD$");
 .option pop
 
        /* Load our pcpu */
-       sd      tp, (TF_TP)(sp)
        ld      tp, (TF_SIZE)(sp)
-.else
-       sd      tp, (TF_TP)(sp)
 .endif
 
        sd      t0, (TF_T + 0 * 8)(sp)

Reply via email to