HomeFreeBSD

LinuxKPI: Allow kmalloc to be called when FPU protection is enabled

Description

LinuxKPI: Allow kmalloc to be called when FPU protection is enabled

Amdgpu driver does a lot of memory allocations in FPU-protected sections
of code for certain display cores, e.g. for DCN30. This does not work
on FreeBSD as its malloc function can not be run within a critical
section. Check this condition and temporally exit from FPU-protected
context to workaround issue and reduce source code patching.

Sponsored by: Serenity Cyber Security, LLC
Reviewed by: manu (previous version)
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D42822

Details

Provenance
wulfAuthored on Feb 10 2024, 10:01 PM
Reviewer
manu
Differential Revision
D42822: LinuxKPI: Add explicit software context to FPU sections
Parents
rGdb65db64fbf3: Revert "LinuxKPI: Add explicit software context to FPU sections"
Branches
Unknown
Tags
Unknown