aboutsummaryrefslogtreecommitdiffstats
path: root/module/icp
diff options
context:
space:
mode:
authorTino Reichardt <[email protected]>2023-03-07 02:01:01 +0100
committerGitHub <[email protected]>2023-03-06 17:01:01 -0800
commit84a1c48c86775c21649ce42b3c512ca3070f8c2d (patch)
tree09c3e1ab7377ff751e7a688c04a6e00166a5502a /module/icp
parent28bf26acb6735f95c47e3f1056cd1142607c0bcc (diff)
Fix detection of IBM Power8 machines (ISA 2.07)
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. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Richard Yao <[email protected]> Signed-off-by: Tino Reichardt <[email protected]> Signed-off-by: Low-power <[email protected]> Closes #14576
Diffstat (limited to 'module/icp')
-rw-r--r--module/icp/algs/sha2/sha256_impl.c6
-rw-r--r--module/icp/algs/sha2/sha512_impl.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/module/icp/algs/sha2/sha256_impl.c b/module/icp/algs/sha2/sha256_impl.c
index f85a33fb6..278d7e577 100644
--- a/module/icp/algs/sha2/sha256_impl.c
+++ b/module/icp/algs/sha2/sha256_impl.c
@@ -151,9 +151,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);
@@ -165,7 +165,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"
};
diff --git a/module/icp/algs/sha2/sha512_impl.c b/module/icp/algs/sha2/sha512_impl.c
index 2a809ccdd..991e832b1 100644
--- a/module/icp/algs/sha2/sha512_impl.c
+++ b/module/icp/algs/sha2/sha512_impl.c
@@ -136,14 +136,14 @@ const sha512_ops_t sha512_ppc_impl = {
.name = "ppc"
};
-static boolean_t sha512_have_vsx(void)
+static boolean_t sha512_have_isa207(void)
{
- return (kfpu_allowed() && zfs_vsx_available());
+ return (kfpu_allowed() && zfs_isa207_available());
}
TF(zfs_sha512_power8, tf_sha512_power8);
const sha512_ops_t sha512_power8_impl = {
- .is_supported = sha512_have_vsx,
+ .is_supported = sha512_have_isa207,
.transform = tf_sha512_power8,
.name = "power8"
};