diff options
author | Ryan Moeller <[email protected]> | 2020-12-10 00:29:00 -0500 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2020-12-23 14:34:59 -0800 |
commit | fb3ad5d24e353bcf3c5c5f7cfff095bfa2a308cf (patch) | |
tree | 7ebb4ea99a95dba799cef73a943c1d4fc9369dcb /include/os/linux | |
parent | de2ac3f700a3aabb4e2602e86328b1cbf778a356 (diff) |
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 <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ryan Moeller <[email protected]>
Closes #11302
Diffstat (limited to 'include/os/linux')
-rw-r--r-- | include/os/linux/kernel/linux/mod_compat.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/os/linux/kernel/linux/mod_compat.h b/include/os/linux/kernel/linux/mod_compat.h index 1c48df5cb..779f1bf91 100644 --- a/include/os/linux/kernel/linux/mod_compat.h +++ b/include/os/linux/kernel/linux/mod_compat.h @@ -150,4 +150,6 @@ enum scope_prefix_types { #define ZFS_MODULE_LICENSE(s) MODULE_LICENSE(s) #define ZFS_MODULE_VERSION(s) MODULE_VERSION(s) +#define module_init_early(fn) module_init(fn) + #endif /* _MOD_COMPAT_H */ |