Skip to content

Commit

Permalink
Makefile: Optimize for sm8150's Kryo 485 CPU setup
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
kdrag0n committed Aug 2, 2019
1 parent 34aca11 commit f45e4ff
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,12 @@ ifdef CONFIG_PROFILE_ALL_BRANCHES
KBUILD_CFLAGS += -O2 $(call cc-disable-warning,maybe-uninitialized,)
else
KBUILD_CFLAGS += -O2
ifeq ($(cc-name),gcc)
KBUILD_CFLAGS += -mcpu=cortex-a76.cortex-a55 -mtune=cortex-a76.cortex-a55
endif
ifeq ($(cc-name),clang)
KBUILD_CFLAGS += -mcpu=cortex-a55 -mtune=cortex-a55
endif
endif
endif

Expand Down

0 comments on commit f45e4ff

Please sign in to comment.