From: Tony Wu <tung7970@gmail.com>
To: ralf@linux-mips.org, macro@linux-mips.org,
Steven.Hill@imgtec.com, david.daney@cavium.com,
linux-mips@linux-mips.org
Subject: [PATCH v4 2/3] MIPS: microMIPS: Add kernel_uses_mmips in cpu-features.h
Date: Mon, 27 May 2013 20:45:57 +0800 [thread overview]
Message-ID: <20130527124557.GB32322@hades> (raw)
In-Reply-To: <20130527124421.GA32322@hades>
Add kernel_uses_mmips to denote whether CONFIG_CPU_MICROMIPS
is set or not. This variable can help cut down #ifdef usage.
Signed-off-by: Tony Wu <tung7970@gmail.com>
Cc: David Daney <david.daney@cavium.com>
Cc: Steven J. Hill <Steven.Hill@imgtec.com>
---
arch/mips/include/asm/cpu-features.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/mips/include/asm/cpu-features.h b/arch/mips/include/asm/cpu-features.h
index e5ec8fc..dc7e94f 100644
--- a/arch/mips/include/asm/cpu-features.h
+++ b/arch/mips/include/asm/cpu-features.h
@@ -101,6 +101,13 @@
#ifndef cpu_has_mmips
#define cpu_has_mmips (cpu_data[0].options & MIPS_CPU_MICROMIPS)
#endif
+#ifndef kernel_uses_mmips
+# ifdef CONFIG_CPU_MICROMIPS
+# define kernel_uses_mmips 1
+# else
+# define kernel_uses_mmips 0
+# endif
+#endif
#ifndef cpu_has_vtag_icache
#define cpu_has_vtag_icache (cpu_data[0].icache.flags & MIPS_CACHE_VTAG)
#endif
--
1.7.10.2 (Apple Git-33)
next prev parent reply other threads:[~2013-05-27 12:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-27 12:44 [PATCH v4 1/3] MIPS: microMIPS: Fix POOL16C minor opcode enum Tony Wu
2013-05-27 12:45 ` Tony Wu [this message]
2013-05-27 14:34 ` [PATCH v4 2/3] MIPS: microMIPS: Add kernel_uses_mmips in cpu-features.h Sergei Shtylyov
2013-06-19 21:56 ` Steven J. Hill
2013-06-19 21:56 ` Steven J. Hill
2013-06-20 9:50 ` Tony Wu
2013-05-27 12:47 ` [PATCH v4 3/3] MIPS: microMIPS: Refactor get_frame_info support Tony Wu
2013-06-19 21:53 ` [PATCH v4 1/3] MIPS: microMIPS: Fix POOL16C minor opcode enum Steven J. Hill
2013-06-19 21:53 ` Steven J. Hill
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=20130527124557.GB32322@hades \
--to=tung7970@gmail.com \
--cc=Steven.Hill@imgtec.com \
--cc=david.daney@cavium.com \
--cc=linux-mips@linux-mips.org \
--cc=macro@linux-mips.org \
--cc=ralf@linux-mips.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