diff --git a/module/icp/algs/blake3/blake3_impl.c b/module/icp/algs/blake3/blake3_impl.c index 238ca68a2a93..2cd0c67ce8b6 100644 --- a/module/icp/algs/blake3/blake3_impl.c +++ b/module/icp/algs/blake3/blake3_impl.c @@ -364,7 +364,7 @@ blake3_param(ZFS_MODULE_PARAM_ARGS) int err; generic_impl_init(); - if ((void *)req->newptr == NULL) { + if ((const void *)req->newptr == NULL) { const uint32_t impl = IMPL_READ(generic_impl_chosen); const int init_buflen = 64; const char *fmt; diff --git a/module/zfs/blake3_zfs.c b/module/zfs/blake3_zfs.c index 7783282b671a..50924534695b 100644 --- a/module/zfs/blake3_zfs.c +++ b/module/zfs/blake3_zfs.c @@ -49,7 +49,7 @@ abd_checksum_blake3_native(abd_t *abd, uint64_t size, const void *ctx_template, { ASSERT(ctx_template != NULL); -#if defined(_KERNEL) +#if defined(_KERNEL) && !(defined(__APPLE__) && defined(__aarch64__)) kpreempt_disable(); BLAKE3_CTX *ctx = blake3_per_cpu_ctx[CPU_SEQID]; #else @@ -60,7 +60,8 @@ abd_checksum_blake3_native(abd_t *abd, uint64_t size, const void *ctx_template, (void) abd_iterate_func(abd, 0, size, blake3_incremental, ctx); Blake3_Final(ctx, (uint8_t *)zcp); -#if defined(_KERNEL) +#if defined(_KERNEL) && !(defined(__APPLE__) && defined(__aarch64__)) + /* To keep conditionals the same */ kpreempt_enable(); #else memset(ctx, 0, sizeof (*ctx));