HomeFreeBSD

Add PPC cpu feature tests for FreeBSD and Linux

Description

Add PPC cpu feature tests for FreeBSD and Linux

Add needed cpu feature tests for powerpc architecture.

Overview:
zfs_altivec_available() - needed by RAID-Z
zfs_vsx_available() - needed by BLAKE3
zfs_isa207_available() - needed by SHA2

Part 1 - Userspace

  • use getauxval() for Linux and elf_aux_info() for FreeBSD
  • direct including <sys/auxv.h> fails with double definitions
  • so we self define the needed functions and definitions

Part 2 - Kernel space FreeBSD

  • use exported cpu_features of <powerpc/cpu.h>

Part 3 - Kernel space Linux

  • use cpu_has_feature() function of <asm/cpufeature.h>

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Tino Reichardt <milky-zfs@mcmilk.de>
Closes #13725

Details

Provenance
Tino Reichardt <milky-zfs@mcmilk.de>Authored on Sep 7 2022, 6:33 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Sep 16 2022, 9:25 PM
Parents
rGeeca9d27d7f6: Add zfs_blake3_impl to zfs.4
Branches
Unknown
Tags
Unknown