The branch main has been updated by jhibbits:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=66b2b71df8aa12b19862bfdc19acc0498165ab53

commit 66b2b71df8aa12b19862bfdc19acc0498165ab53
Author:     Justin Hibbits <jhibb...@freebsd.org>
AuthorDate: 2021-05-30 02:53:26 +0000
Commit:     Justin Hibbits <jhibb...@freebsd.org>
CommitDate: 2021-05-30 02:53:26 +0000

    Wrap the default SPE config in its own #define
    
    No functional change.  Cleans up the code a little.
---
 sys/powerpc/include/spr.h          | 2 ++
 sys/powerpc/powerpc/exec_machdep.c | 6 ++----
 sys/powerpc/powerpc/swtch32.S      | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/sys/powerpc/include/spr.h b/sys/powerpc/include/spr.h
index a97e49e77d76..2e2c3306cee1 100644
--- a/sys/powerpc/include/spr.h
+++ b/sys/powerpc/include/spr.h
@@ -337,6 +337,8 @@
 #define          SPEFSCR_FUNFE           0x00000008
 #define          SPEFSCR_FOVFE           0x00000004
 #define          SPEFSCR_FRMC_M          0x00000003
+#define          SPEFSCR_DFLT            (SPEFSCR_FINVE | SPEFSCR_FDBZE | \
+                                   SPEFSCR_FUNFE | SPEFSCR_FOVFE)
 #define        SPR_IBAT0U              0x210   /* .6. Instruction BAT Reg 0 
Upper */
 #define        SPR_IBAT0L              0x211   /* .6. Instruction BAT Reg 0 
Lower */
 #define        SPR_IBAT1U              0x212   /* .6. Instruction BAT Reg 1 
Upper */
diff --git a/sys/powerpc/powerpc/exec_machdep.c 
b/sys/powerpc/powerpc/exec_machdep.c
index 97e4caba956a..869fad96e2bd 100644
--- a/sys/powerpc/powerpc/exec_machdep.c
+++ b/sys/powerpc/powerpc/exec_machdep.c
@@ -1057,8 +1057,7 @@ cpu_copy_thread(struct thread *td, struct thread *td0)
        #endif
        pcb2->pcb_cpu.aim.usr_vsid = 0;
 #ifdef __SPE__
-       pcb2->pcb_vec.vscr = SPEFSCR_FINVE | SPEFSCR_FDBZE |
-           SPEFSCR_FUNFE | SPEFSCR_FOVFE;
+       pcb2->pcb_vec.vscr = SPEFSCR_DFLT;
 #endif
 
        /* Setup to release spin count in fork_exit(). */
@@ -1113,8 +1112,7 @@ cpu_set_upcall(struct thread *td, void (*entry)(void *), 
void *arg,
 
        td->td_pcb->pcb_flags = 0;
 #ifdef __SPE__
-       td->td_pcb->pcb_vec.vscr = SPEFSCR_FINVE | SPEFSCR_FDBZE |
-           SPEFSCR_FUNFE | SPEFSCR_FOVFE;
+       td->td_pcb->pcb_vec.vscr = SPEFSCR_DFLT;
 #endif
 
        td->td_retval[0] = (register_t)entry;
diff --git a/sys/powerpc/powerpc/swtch32.S b/sys/powerpc/powerpc/swtch32.S
index 6ad781895dc3..dba0171577a4 100644
--- a/sys/powerpc/powerpc/swtch32.S
+++ b/sys/powerpc/powerpc/swtch32.S
@@ -224,7 +224,7 @@ ENTRY(fork_trampoline)
                                           does when allocating space for
                                           a frame pointer/saved LR */
 #ifdef __SPE__
-       li      %r3,SPEFSCR_FINVE|SPEFSCR_FDBZE|SPEFSCR_FUNFE|SPEFSCR_FOVFE
+       li      %r3,SPEFSCR_DFLT
        mtspr   SPR_SPEFSCR, %r3
 #endif
        b       trapexit
_______________________________________________
dev-commits-src-main@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main
To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"

Reply via email to