diff --git a/include/os/linux/spl/sys/isa_defs.h b/include/os/linux/spl/sys/isa_defs.h index 2207ee2025..a032aae916 100644 --- a/include/os/linux/spl/sys/isa_defs.h +++ b/include/os/linux/spl/sys/isa_defs.h @@ -95,7 +95,7 @@ #define _ALIGNMENT_REQUIRED 1 /* arm arch specific defines */ -#elif defined(__arm) || defined(__arm__) || defined(__aarch64__) +#elif defined(__arm) || defined(__arm__) #if !defined(__arm) #define __arm @@ -105,17 +105,11 @@ #define __arm__ #endif -#if defined(__aarch64__) -#if !defined(_LP64) -#define _LP64 -#endif -#else #if !defined(_ILP32) #define _ILP32 #endif -#endif -#if defined(__ARMEL__) || defined(__AARCH64EL__) +#if defined(__ARMEL__) #define _ZFS_LITTLE_ENDIAN #else #define _ZFS_BIG_ENDIAN @@ -127,6 +121,19 @@ */ #define _ALIGNMENT_REQUIRED 1 +/* aarch64 arch specific defines */ +#elif defined(__aarch64__) + +#if !defined(_LP64) +#define _LP64 +#endif + +#if defined(__AARCH64EL__) +#define _ZFS_LITTLE_ENDIAN +#else +#define _ZFS_BIG_ENDIAN +#endif + /* sparc arch specific defines */ #elif defined(__sparc) || defined(__sparc__) diff --git a/lib/libspl/include/sys/isa_defs.h b/lib/libspl/include/sys/isa_defs.h index 8c0932f576..3922445db3 100644 --- a/lib/libspl/include/sys/isa_defs.h +++ b/lib/libspl/include/sys/isa_defs.h @@ -126,7 +126,7 @@ extern "C" { #endif /* arm arch specific defines */ -#elif defined(__arm) || defined(__arm__) || defined(__aarch64__) +#elif defined(__arm) || defined(__arm__) #if !defined(__arm) #define __arm @@ -136,17 +136,11 @@ extern "C" { #define __arm__ #endif -#if defined(__aarch64__) -#if !defined(_LP64) -#define _LP64 -#endif -#else #if !defined(_ILP32) #define _ILP32 #endif -#endif -#if defined(__ARMEL__) || defined(__AARCH64EL__) +#if defined(__ARMEL__) #define _ZFS_LITTLE_ENDIAN #else #define _ZFS_BIG_ENDIAN @@ -158,6 +152,21 @@ extern "C" { #define HAVE_EFFICIENT_UNALIGNED_ACCESS #endif +/* aarch64 arch specific defines */ +#elif defined(__aarch64__) + +#if !defined(_LP64) +#define _LP64 +#endif + +#if defined(__AARCH64EL__) +#define _ZFS_LITTLE_ENDIAN +#else +#define _ZFS_BIG_ENDIAN +#endif + +#define _SUNOS_VTOC_16 + /* sparc arch specific defines */ #elif defined(__sparc) || defined(__sparc__)