HomeFreeBSD

Enable IRQ during syscalls on ARM64

Description

Enable IRQ during syscalls on ARM64

FreeBSD provides a feature called Adaptive Mutexes, which allows
a thread to spin for a while when the mutex is taken instead of
immediately going to sleep. This causes issues when called from
syscall handler if interrupts are masked. If every other core
also attempts to access the same mutex there is a chance that
all of them are spinning on the same lock at the same time.
If interrupts are disabled, no kernel preemtion can occur and
the system becomes unresponsive.

This patch enables interrupts when syscall is being executed
and masks them as soon as it is completed.

Reviewed by: andrew
Obtained from: Semihalf
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3246

Details

Provenance
zbbAuthored on
Reviewer
andrew
Differential Revision
D3246: Enable IRQ during syscalls on ARM64
Parents
rS286071: Remove obsolete vendor code from Alpine platform support
Branches
Unknown
Tags
Unknown