Skip to content

Commit

Permalink
Fix detection of IBM Power8 machines (ISA 2.07)
Browse files Browse the repository at this point in the history
An IBM POWER7 system with Power ISA 2.06 tried to execute
zfs_sha256_power8() - which should only be run on ISA 2.07
machines.

The detection is implemented via the zfs_isa207_available() call,
but this check was not used.

This pull request will fix this.

Signed-off-by: Tino Reichardt <milky-zfs@mcmilk.de>
  • Loading branch information
mcmilk committed Mar 5, 2023
1 parent 620a977 commit a2de299
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions module/icp/algs/sha2/sha256_impl.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ const sha256_ops_t sha256_armv8_impl = {
};

#elif defined(__PPC64__)
static boolean_t sha256_have_vsx(void)
static boolean_t sha256_have_isa207(void)
{
return (kfpu_allowed() && zfs_vsx_available());
return (kfpu_allowed() && zfs_isa207_available());
}

TF(zfs_sha256_ppc, tf_sha256_ppc);
Expand All @@ -155,7 +155,7 @@ const sha256_ops_t sha256_ppc_impl = {

TF(zfs_sha256_power8, tf_sha256_power8);
const sha256_ops_t sha256_power8_impl = {
.is_supported = sha256_have_vsx,
.is_supported = sha256_have_isa207,
.transform = tf_sha256_power8,
.name = "power8"
};
Expand Down

0 comments on commit a2de299

Please sign in to comment.