HomeFreeBSD

Fix kernel unaligned access on sparc64

Description

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 <behlendorf1@llnl.gov>
Closes #7642
Closes #7684

Details

Provenance
Brian Behlendorf <behlendorf1@llnl.gov>Authored on Jul 11 2018, 8:10 PM
GitHub <noreply@github.com>Committed on Jul 11 2018, 8:10 PM
Parents
rG2dca37d8dc13: OpenZFS 9424 - ztest failure: "unprotected error in call to Lua API (Invalid…
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rG33a19e0fd9b2: Fix kernel unaligned access on sparc64 (authored by Brian Behlendorf <behlendorf1@llnl.gov>).Jul 11 2018, 8:10 PM