Module Name: src Committed By: mrg Date: Sun Apr 18 10:40:34 UTC 2021
Modified Files: src/sys/arch/mips/mips: locore.S Log Message: move softint_cleanup, which is a part of softint_fast_dispatch(), into the section of code known as softint_fast_dispatch(). previous: db> x/i softint_cleanup netbsd:cpu_switchto+0xd4: ld t0,0(t8) except that cpu_switchto() ends at cpu_switchto+0xd0. now: db> x/i softint_cleanup netbsd:softint_fast_dispatch+0xa4: ld t0,0(t8) tested on OCTEON. To generate a diff of this commit: cvs rdiff -u -r1.226 -r1.227 src/sys/arch/mips/mips/locore.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/mips/mips/locore.S diff -u src/sys/arch/mips/mips/locore.S:1.226 src/sys/arch/mips/mips/locore.S:1.227 --- src/sys/arch/mips/mips/locore.S:1.226 Sat Sep 26 08:21:10 2020 +++ src/sys/arch/mips/mips/locore.S Sun Apr 18 10:40:34 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.226 2020/09/26 08:21:10 simonb Exp $ */ +/* $NetBSD: locore.S,v 1.227 2021/04/18 10:40:34 mrg Exp $ */ /* * Copyright (c) 1992, 1993 @@ -63,7 +63,7 @@ #include <mips/trap.h> #include <mips/locore.h> -RCSID("$NetBSD: locore.S,v 1.226 2020/09/26 08:21:10 simonb Exp $") +RCSID("$NetBSD: locore.S,v 1.227 2021/04/18 10:40:34 mrg Exp $") #include "assym.h" @@ -351,36 +351,6 @@ END(cpu_switchto) * * called at IPL_HIGH * - */ -softint_cleanup: -#ifdef PARANOIA - mfc0 t1, MIPS_COP_0_STATUS - MFC0_HAZARD - and v0, t1, MIPS_SR_INT_IE -#if __mips >= 32 - teqi v0, 0 -#else -1: beqz v0, 1b - nop -#endif -#endif /* PARANOIA */ - PTR_L t0, L_CPU(MIPS_CURLWP) - NOP_L # load delay - INT_L t1, CPU_INFO_MTX_COUNT(t0) - NOP_L # load delay - INT_ADDU t1, 1 - INT_S t1, CPU_INFO_MTX_COUNT(t0) - REG_L ra, CALLFRAME_RA(sp) - REG_L v0, CALLFRAME_S0(sp) # get softint lwp - NOP_L # load delay -#if IPL_SCHED != IPL_HIGH - j _C_LABEL(splhigh_noprof) -#else - jr ra -#endif - PTR_ADDU sp, CALLFRAME_SIZ - -/* * Arguments: * a0 the LWP to switch to * a1 IPL to execute at @@ -463,6 +433,34 @@ NESTED(softint_fast_dispatch, CALLFRAME_ */ jr ra PTR_ADDU sp, CALLFRAME_SIZ + +softint_cleanup: +#ifdef PARANOIA + mfc0 t1, MIPS_COP_0_STATUS + MFC0_HAZARD + and v0, t1, MIPS_SR_INT_IE +#if __mips >= 32 + teqi v0, 0 +#else +1: beqz v0, 1b + nop +#endif +#endif /* PARANOIA */ + PTR_L t0, L_CPU(MIPS_CURLWP) + NOP_L # load delay + INT_L t1, CPU_INFO_MTX_COUNT(t0) + NOP_L # load delay + INT_ADDU t1, 1 + INT_S t1, CPU_INFO_MTX_COUNT(t0) + REG_L ra, CALLFRAME_RA(sp) + REG_L v0, CALLFRAME_S0(sp) # get softint lwp + NOP_L # load delay +#if IPL_SCHED != IPL_HIGH + j _C_LABEL(splhigh_noprof) +#else + jr ra +#endif + PTR_ADDU sp, CALLFRAME_SIZ END(softint_fast_dispatch) #endif /* __HAVE_FAST_SOFTINTS */