mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
zcommon: Refactor FPU state handling in fletcher4
Currently calls to kfpu_begin() and kfpu_end() are split between the init() and fini() functions of the particular SIMD implementation. This was done in #14247 as an optimization measure for the ABD adapter. Unfortunately the split complicates FPU handling on platforms that use a local FPU state buffer, like Windows and macOS. To ease porting, we introduce a boolean struct member in fletcher_4_ops_t, indicating use of the FPU, and move the FPU state handling from the SIMD implementations to the call sites. Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Reviewed-by: Jorgen Lundman <lundman@lundman.net> Signed-off-by: Attila Fülöp <attila@fueloep.org> Closes #14600
This commit is contained in:
@@ -126,8 +126,9 @@ typedef struct fletcher_4_func {
|
||||
fletcher_4_fini_f fini_byteswap;
|
||||
fletcher_4_compute_f compute_byteswap;
|
||||
boolean_t (*valid)(void);
|
||||
boolean_t uses_fpu;
|
||||
const char *name;
|
||||
} fletcher_4_ops_t;
|
||||
} __attribute__((aligned(64))) fletcher_4_ops_t;
|
||||
|
||||
_ZFS_FLETCHER_H const fletcher_4_ops_t fletcher_4_superscalar_ops;
|
||||
_ZFS_FLETCHER_H const fletcher_4_ops_t fletcher_4_superscalar4_ops;
|
||||
|
||||
Reference in New Issue
Block a user