freebsd-nq/module/zcommon
Ryan Moeller e0716250bf
FreeBSD: Do zcommon_init sooner to avoid FPU panic
There has been a panic affecting some system configurations where the
thread FPU context is disturbed during the fletcher 4 benchmarks,
leading to a panic at boot.

module_init() registers zcommon_init to run in the last subsystem
(SI_SUB_LAST).  Running it as soon as interrupts have been configured
(SI_SUB_INT_CONFIG_HOOKS) makes sure we have finished the benchmarks
before we start doing other things.

While it's not clear *how* the FPU context was being disturbed, this
does seem to avoid it.

Add a module_init_early() macro to run zcommon_init() at this earlier
point on FreeBSD.  On Linux this is defined as module_init().

Authored by: Konstantin Belousov <kib@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #11302
2020-12-09 21:29:00 -08:00
..
cityhash.c Compile cityhash code into libzfs 2020-03-27 09:11:22 -07:00
Makefile.in Cleanup linux module kbuild files 2020-06-10 09:24:15 -07:00
zfeature_common.c Update dRAID short feature description 2020-11-23 14:49:17 -08:00
zfs_comutil.c Fix "zpool add -n" for dedup, special and log devices 2020-01-06 15:40:06 -08:00
zfs_deleg.c Remove code for zfs remap 2019-06-24 16:44:01 -07:00
zfs_fletcher_aarch64_neon.c OpenZFS restructuring - move platform specific headers 2019-09-05 09:34:54 -07:00
zfs_fletcher_avx512.c Refactor ccompile.h to not include system headers 2020-07-25 20:09:50 -07:00
zfs_fletcher_intel.c OpenZFS restructuring - move platform specific headers 2019-09-05 09:34:54 -07:00
zfs_fletcher_sse.c OpenZFS restructuring - move platform specific headers 2019-09-05 09:34:54 -07:00
zfs_fletcher_superscalar4.c Refactor ccompile.h to not include system headers 2020-07-25 20:09:50 -07:00
zfs_fletcher_superscalar.c Refactor ccompile.h to not include system headers 2020-07-25 20:09:50 -07:00
zfs_fletcher.c Reduce fletcher4 and raidz benchmark times 2020-12-06 09:57:20 -08:00
zfs_namecheck.c Distributed Spare (dRAID) Feature 2020-11-13 13:51:51 -08:00
zfs_prop.c FreeBSD: Do zcommon_init sooner to avoid FPU panic 2020-12-09 21:29:00 -08:00
zfs_uio.c Bugfix/fix uio partial copies 2020-04-01 09:48:54 -07:00
zpool_prop.c Add define to enable autotrim to default to on 2020-08-18 09:52:30 -07:00
zprop_common.c Left-align index props 2020-01-31 08:55:51 -08:00