From: Nicholas Piggin <npiggin@gmail.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: Nicholas Piggin <npiggin@gmail.com>
Subject: [PATCH 8/9] powerpc/64s/le: refine feature sets for little endian builds
Date: Wed, 21 Feb 2018 05:08:31 +1000 [thread overview]
Message-ID: <20180220190832.1872-9-npiggin@gmail.com> (raw)
In-Reply-To: <20180220190832.1872-1-npiggin@gmail.com>
This reduces vmlinux text size by 1kB and data by 1.5kB with
a small build!
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
arch/powerpc/include/asm/cputable.h | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/arch/powerpc/include/asm/cputable.h b/arch/powerpc/include/asm/cputable.h
index 8907f44df708..cb423f2a5696 100644
--- a/arch/powerpc/include/asm/cputable.h
+++ b/arch/powerpc/include/asm/cputable.h
@@ -479,6 +479,13 @@ static inline void cpu_feature_keys_init(void) { }
#ifdef CONFIG_PPC_BOOK3E
#define CPU_FTRS_POSSIBLE (CPU_FTRS_E6500 | CPU_FTRS_E5500)
#else
+#ifdef CONFIG_CPU_LITTLE_ENDIAN
+#define CPU_FTRS_POSSIBLE \
+ (CPU_FTRS_POWER7 | CPU_FTRS_POWER8E | \
+ CPU_FTRS_POWER8 | CPU_FTRS_POWER8_DD1 | \
+ CPU_FTR_ALTIVEC_COMP | CPU_FTR_VSX_COMP | \
+ CPU_FTRS_POWER9 | CPU_FTRS_POWER9_DD1 | CPU_FTRS_POWER9_DD2_1)
+#else
#define CPU_FTRS_POSSIBLE \
(CPU_FTRS_PPC970 | CPU_FTRS_POWER5 | \
CPU_FTRS_POWER6 | CPU_FTRS_POWER7 | CPU_FTRS_POWER8E | \
@@ -486,6 +493,7 @@ static inline void cpu_feature_keys_init(void) { }
CPU_FTRS_PA6T | CPU_FTR_ALTIVEC_COMP | CPU_FTR_VSX_COMP | \
CPU_FTRS_POWER9 | CPU_FTRS_POWER9_DD1 | CPU_FTRS_POWER9_DD2_1)
#endif
+#endif
#else
enum {
CPU_FTRS_POSSIBLE =
@@ -531,6 +539,13 @@ enum {
#ifdef CONFIG_PPC_BOOK3E
#define CPU_FTRS_ALWAYS (CPU_FTRS_E6500 & CPU_FTRS_E5500)
#else
+#ifdef CONFIG_CPU_LITTLE_ENDIAN
+#define CPU_FTRS_ALWAYS \
+ (CPU_FTRS_POWER7 & CPU_FTRS_POWER8E & \
+ CPU_FTRS_POWER8 & CPU_FTRS_POWER8_DD1 & \
+ CPU_FTRS_POWER9 & CPU_FTRS_POWER9_DD1 & CPU_FTRS_POWER9_DD2_1 & \
+ CPU_FTRS_POSSIBLE & ~CPU_FTR_HVMODE)
+#else
#define CPU_FTRS_ALWAYS \
(CPU_FTRS_PPC970 & CPU_FTRS_POWER5 & \
CPU_FTRS_POWER6 & CPU_FTRS_POWER7 & CPU_FTRS_CELL & \
@@ -538,6 +553,7 @@ enum {
CPU_FTRS_POWER8_DD1 & ~CPU_FTR_HVMODE & CPU_FTRS_POSSIBLE & \
CPU_FTRS_POWER9 & CPU_FTRS_POWER9_DD1 & CPU_FTRS_POWER9_DD2_1)
#endif
+#endif
#else
enum {
CPU_FTRS_ALWAYS =
--
2.16.1
next prev parent reply other threads:[~2018-02-20 22:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-20 19:08 [PATCH 0/9] powerpc cpu feature and kernel build stuff Nicholas Piggin
2018-02-20 19:08 ` [PATCH 1/9] powerpc/64s: cputable add all POWER9 features to CPU_FTRS_ALWAYS Nicholas Piggin
2018-04-03 16:03 ` [1/9] " Michael Ellerman
2018-02-20 19:08 ` [PATCH 2/9] powerpc/64s: fix CPU_FTRS_POSSIBLE vector features Nicholas Piggin
2018-02-20 19:08 ` [PATCH 3/9] powerpc/64s: kbuild set assembler machine type to POWER4 Nicholas Piggin
2018-02-21 11:15 ` kbuild test robot
2018-02-21 11:51 ` Nicholas Piggin
2018-02-20 19:08 ` [PATCH 4/9] powerpc/64s: dt_cpu_ftrs fix POWER9 DD2.2 and above Nicholas Piggin
2018-02-20 19:08 ` [PATCH 5/9] powerpc: remove unused CPU_FTR_ARCH_201 Nicholas Piggin
2018-02-20 19:08 ` [PATCH 6/9] powerpc/64s: remove POWER4 support Nicholas Piggin
2018-02-20 19:08 ` [PATCH 7/9] powerpc/64/le: add GENERIC_CPU support Nicholas Piggin
2018-02-20 19:08 ` Nicholas Piggin [this message]
2018-02-20 19:08 ` [PATCH 9/9] powerpc/64s: add POWER9 CPU type selection Nicholas Piggin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180220190832.1872-9-npiggin@gmail.com \
--to=npiggin@gmail.com \
--cc=linuxppc-dev@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).