From 33a19e0fd9b22364d295351ea1bda57b80e39e85 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 11 Jul 2018 13:10:40 -0700 Subject: Fix kernel unaligned access on sparc64 Update the SA_COPY_DATA macro to check if architecture supports efficient unaligned memory accesses at compile time. Otherwise fallback to using the sa_copy_data() function. The kernel provided CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is used to determine availability in kernel space. In user space the x86_64, x86, powerpc, and sometimes arm architectures will define the HAVE_EFFICIENT_UNALIGNED_ACCESS macro. Signed-off-by: Brian Behlendorf Closes #7642 Closes #7684 --- module/icp/algs/modes/ccm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/icp') diff --git a/module/icp/algs/modes/ccm.c b/module/icp/algs/modes/ccm.c index 22aeb0a6a..fb41194f8 100644 --- a/module/icp/algs/modes/ccm.c +++ b/module/icp/algs/modes/ccm.c @@ -28,7 +28,7 @@ #include #include -#if defined(__i386) || defined(__amd64) +#ifdef HAVE_EFFICIENT_UNALIGNED_ACCESS #include #define UNALIGNED_POINTERS_PERMITTED #endif -- cgit v1.2.3