Skip to content

Commit

Permalink
arm64: pass machine size to sparse
Browse files Browse the repository at this point in the history
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@arm.com>
CC: Will Deacon <will.deacon@arm.com>
CC: linux-arm-kernel@lists.infradead.org
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
  • Loading branch information
Luc Van Oostenryck authored and Will Deacon committed Jun 20, 2017
1 parent bb4322f commit f5d2849
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm64/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ LD += -EL
UTS_MACHINE := aarch64
endif

CHECKFLAGS += -D__aarch64__
CHECKFLAGS += -D__aarch64__ -m64

ifeq ($(CONFIG_ARM64_MODULE_CMODEL_LARGE), y)
KBUILD_CFLAGS_MODULE += -mcmodel=large
Expand Down

0 comments on commit f5d2849

Please sign in to comment.