Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle aarch64 defines seperate from arm #13151

Merged
merged 1 commit into from
Mar 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 15 additions & 8 deletions include/os/linux/spl/sys/isa_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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__)

Expand Down
25 changes: 17 additions & 8 deletions lib/libspl/include/sys/isa_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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__)

Expand Down