Page MenuHomeFreeBSD

linuxkpi: make FPU sections thread-safe and NOCTX
ClosedPublic

Authored by val_packett.cool on Apr 22 2021, 11:20 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 12, 9:33 AM
Unknown Object (File)
Thu, Apr 11, 7:44 AM
Unknown Object (File)
Mar 18 2024, 5:43 AM
Unknown Object (File)
Jan 11 2024, 11:16 PM
Unknown Object (File)
Dec 20 2023, 8:33 AM
Unknown Object (File)
Dec 12 2023, 7:50 AM
Unknown Object (File)
Oct 13 2023, 4:33 PM
Unknown Object (File)
Oct 12 2023, 7:33 AM

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

sys/compat/linuxkpi/common/include/asm/fpu/api.h
35

Comment should follow style.

41

Use ANSI C definitions.

43

This is still completely melts if more than one thread does kernel_fpu_begin()

hselasky added inline comments.
sys/compat/linuxkpi/common/include/asm/fpu/api.h
43

Feel free to extend the LinuxKPI's "current" with this variable.

val_packett.cool retitled this revision from linuxkpi: use NOCTX FPU sections to linuxkpi: make FPU sections thread-safe and NOCTX.
sys/compat/linuxkpi/common/include/asm/fpu/api.h
41

Huh? The only non-ANSI thing I know of is "K&R style" local variables being declared before the opening { bracket. But these functions do not declare any locals at all…??

43

Feel free to extend the LinuxKPI's "current" with this variable.

OH! Thanks, that makes sense now. Where was this comment when I posted the original patch ;)

sys/compat/linuxkpi/common/include/asm/fpu/api.h
41

Oh.. you mean the whole "blank () args doesn't mean no args" thing I guess

This revision is now accepted and ready to land.Apr 22 2021, 5:00 PM

No one is stepping up to test on affected hardware, so I guess this can just be committed already

Make sure you bump the __FreeBSD_version when you commit this.

--HPS

well, I can't exactly commit anything myself ;)

I'll try to help you. Just be patient :-)

This broke at least i915kms from drm-kmod despite building successfully. I've reported there as well, since I'm not sure where any fixes need to go.