[PATCH AUTOSEL for 4.4 054/162] arm64: pass machine size to sparse
Sasha Levin
Alexander.Levin at microsoft.com
Sun Apr 8 17:28:21 PDT 2018
From: Luc Van Oostenryck <luc.vanoostenryck at gmail.com>
[ Upstream commit f5d284900c0f960e318a063f4c40826b6e3aa6a8 ]
When using sparse on the arm64 tree we get many thousands of
warnings like 'constant ... is so big it is unsigned long long'
or 'shift too big (32) for type unsigned long'. This happens
because by default sparse considers the machine as 32bit and
defines the size of the types accordingly.
Fix this by passing the '-m64' flag to sparse so that
sparse can correctly define longs as being 64bit.
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>
Signed-off-by: Will Deacon <will.deacon at arm.com>
Signed-off-by: Sasha Levin <alexander.levin at microsoft.com>
---
arch/arm64/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
index b6c90e5006e4..119d1885a3c0 100644
--- a/arch/arm64/Makefile
+++ b/arch/arm64/Makefile
@@ -40,7 +40,7 @@ AS += -EL
LD += -EL
endif
-CHECKFLAGS += -D__aarch64__
+CHECKFLAGS += -D__aarch64__ -m64
ifeq ($(CONFIG_ARM64_ERRATUM_843419), y)
KBUILD_CFLAGS_MODULE += -mcmodel=large
--
2.15.1
More information about the linux-arm-kernel
mailing list