Skip to content

Commit f45e4ff

Browse files
committed
Makefile: Optimize for sm8150's Kryo 485 CPU setup
The big (Gold and Prime) cores are derived from ARM's Cortex-A75 reference design, while the little (Silver) cores are derived from Cortex-A55. Clang doen't support optimizing for two clusters at once, so help the weaker little cluster out a bit by optimizing exclusive for it instead since it needs all the speed it can get. Test: GCC 9.1.0 and Clang 10.0.0svn both compile working kernels Signed-off-by: Danny Lin <[email protected]>
1 parent 34aca11 commit f45e4ff

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -682,6 +682,12 @@ ifdef CONFIG_PROFILE_ALL_BRANCHES
682682
KBUILD_CFLAGS += -O2 $(call cc-disable-warning,maybe-uninitialized,)
683683
else
684684
KBUILD_CFLAGS += -O2
685+
ifeq ($(cc-name),gcc)
686+
KBUILD_CFLAGS += -mcpu=cortex-a76.cortex-a55 -mtune=cortex-a76.cortex-a55
687+
endif
688+
ifeq ($(cc-name),clang)
689+
KBUILD_CFLAGS += -mcpu=cortex-a55 -mtune=cortex-a55
690+
endif
685691
endif
686692
endif
687693

0 commit comments

Comments
 (0)