]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Repeat the spinlock_enter/exit pattern from amd64 on other architectures to
authorjeff <jeff@FreeBSD.org>
Mon, 16 Dec 2019 20:15:04 +0000 (20:15 +0000)
committerjeff <jeff@FreeBSD.org>
Mon, 16 Dec 2019 20:15:04 +0000 (20:15 +0000)
commitaefc8ff8af51cff738a975e85a36968bdf8aca1b
treed15d0bf3a1e0cef48b7e615d7101a69dd0e45141
parente41f6b35b706a65fc5243073451db8cc3214dbc0
Repeat the spinlock_enter/exit pattern from amd64 on other architectures to
fix an assert violation introduced in r355784.  Without this spinlock_exit()
may see owepreempt and switch before reducing the spinlock count.  amd64
had been optimized to do a single critical enter/exit regardless of the
number of spinlocks which avoided the problem and this optimization had
not been applied elsewhere.

Reported by: emaste
Suggested by: rlibby
Discussed with: jhb, rlibby
Tested by: manu (arm64)
sys/arm/arm/machdep.c
sys/arm64/arm64/machdep.c
sys/i386/i386/machdep.c
sys/mips/mips/machdep.c
sys/powerpc/powerpc/machdep.c
sys/riscv/riscv/machdep.c