Re: git: c0b8047bdc13 - main - LinuxKPI: Allow kmalloc to be called when FPU protection is enabled

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Mon, 12 Feb 2024 17:57:09 UTC
On 2/10/24 2:03 PM, Vladimir Kondratyev wrote:
> The branch main has been updated by wulf:
> 
> URL: https://cgit.FreeBSD.org/src/commit/?id=c0b8047bdc13040eafb162c4b7b5dba11034ff4b
> 
> commit c0b8047bdc13040eafb162c4b7b5dba11034ff4b
> Author:     Vladimir Kondratyev <wulf@FreeBSD.org>
> AuthorDate: 2024-02-10 22:01:50 +0000
> Commit:     Vladimir Kondratyev <wulf@FreeBSD.org>
> CommitDate: 2024-02-10 22:01:50 +0000
> 
>      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

Thanks!

-- 
John Baldwin