[PATCH] arm64: pass endianness info to sparse

Will Deacon will.deacon at arm.com
Mon Jun 26 02:15:43 PDT 2017


On Sat, Jun 24, 2017 at 05:42:11PM +0200, Luc Van Oostenryck wrote:
> ARM64 depends on the macro __AARCH64EB__ being defined or not
> to correctly select or define endian-specific macros, structures
> or pieces of code.
> 
> This macro is predefined by the compiler but sparse knows nothing
> about it and thus may pre-process files differently from what
> gcc would.
> 
> Fix this by passing '-D__AARCH64EL__' or '-D__AARCH64EB__' to
> sparse depending of the endianness of the kernel, like defined
> by GCC.
> 
> Note: In most case it won't change anything since most arm64 use
>       little-endian (but an allyesconfig would use big-endian!).
> 
> CC: Catalin Marinas <catalin.marinas at arm.com>
> CC: Will Deacon <will.deacon at arm.com>
> CC: linux-arm-kernel at lists.infradead.org
> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck at gmail.com>
> ---
>  arch/arm64/Makefile | 2 ++
>  1 file changed, 2 insertions(+)

Thanks, I'll pick this up.

Will



More information about the linux-arm-kernel mailing list