Date: Sun, 30 May 2021 02:54:02 GMT From: Justin Hibbits <jhibbits@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 66b2b71df8aa - main - Wrap the default SPE config in its own #define Message-ID: <202105300254.14U2s2tT010316@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=66b2b71df8aa12b19862bfdc19acc0498165ab53 commit 66b2b71df8aa12b19862bfdc19acc0498165ab53 Author: Justin Hibbits <jhibbits@FreeBSD.org> AuthorDate: 2021-05-30 02:53:26 +0000 Commit: Justin Hibbits <jhibbits@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202105300254.14U2s2tT010316>