Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/sys/arch



Module Name:    src
Committed By:   riastradh
Date:           Sat Aug 20 11:34:08 UTC 2022

Modified Files:
        src/sys/arch/aarch64/aarch64: fpu.c
        src/sys/arch/arm/vfp: vfp_init.c
        src/sys/arch/x86/x86: fpu.c

Log Message:
fpu_kern_enter/leave: Disable IPL assertions.

These don't work because mutex_enter/exit on a spin lock may raise an
IPL but not lower it, if another spin lock was already held.  For
example,

        mutex_enter(some_lock_at_IPL_VM);
        printf("foo\n");
        fpu_kern_enter();
        ...
        fpu_kern_leave();
        mutex_exit(some_lock_at_IPL_VM);

will trigger the panic, because printf takes a lock at IPL_HIGH where
the IPL wil remain until the mutex_exit.  (This was a nightmare to
track down before I remembered that detail of spin lock IPL
semantics...)


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/aarch64/aarch64/fpu.c
cvs rdiff -u -r1.77 -r1.78 src/sys/arch/arm/vfp/vfp_init.c
cvs rdiff -u -r1.78 -r1.79 src/sys/arch/x86/x86/fpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index