From: Babu Moger <babu.moger@oracle.com>
To: gregkh@linuxfoundation.org, ysato@users.sourceforge.jp,
geert@linux-m68k.org, jonas@southpole.se,
stefan.kristiansson@saunalahti.fi, shorne@gmail.com,
jejb@parisc-linux.org, deller@gmx.de, davem@davemloft.net,
viro@zeniv.linux.org.uk, monstr@monstr.eu
Cc: mpe@ellerman.id.au, peterz@infradead.org, mingo@redhat.com,
jcmvbkbc@gmail.com, linux-kernel@vger.kernel.org,
uclinux-h8-devel@lists.sourceforge.jp,
linux-m68k@vger.kernel.org, openrisc@lists.librecores.org,
linux-parisc@vger.kernel.org, sparclinux@vger.kernel.org
Subject: [PATCH v3 2/3] arch/microblaze: Add choice for endianness and update Makefile
Date: Thu, 6 Jul 2017 09:34:20 -0700 [thread overview]
Message-ID: <1499358861-179979-3-git-send-email-babu.moger@oracle.com> (raw)
In-Reply-To: <1499358861-179979-1-git-send-email-babu.moger@oracle.com>
microblaze architectures can be configured for either little or
big endian formats. Add a choice option for the user to select the
correct endian format(default to big endian).
Also update the Makefile so toolchain can compile for the format
it is configured for.
Signed-off-by: Babu Moger <babu.moger@oracle.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
arch/microblaze/Kconfig | 16 ++++++++++++++++
arch/microblaze/Makefile | 2 ++
2 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig
index 85885a5..74aa5de 100644
--- a/arch/microblaze/Kconfig
+++ b/arch/microblaze/Kconfig
@@ -35,6 +35,22 @@ config MICROBLAZE
select VIRT_TO_BUS
select CPU_NO_EFFICIENT_FFS
+# Endianness selection
+choice
+ prompt "Endianness selection"
+ default CPU_BIG_ENDIAN
+ help
+ microblaze architectures can be configured for either little or
+ big endian formats. Be sure to select the appropriate mode.
+
+config CPU_BIG_ENDIAN
+ bool "Big endian"
+
+config CPU_LITTLE_ENDIAN
+ bool "Little endian"
+
+endchoice
+
config SWAP
def_bool n
diff --git a/arch/microblaze/Makefile b/arch/microblaze/Makefile
index 740f2b8..1f6c486 100644
--- a/arch/microblaze/Makefile
+++ b/arch/microblaze/Makefile
@@ -35,6 +35,8 @@ endif
CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_DIV) += -mno-xl-soft-div
CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_BARREL) += -mxl-barrel-shift
CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR) += -mxl-pattern-compare
+CPUFLAGS-$(CONFIG_BIG_ENDIAN) += -mbig-endian
+CPUFLAGS-$(CONFIG_LITTLE_ENDIAN) += -mlittle-endian
CPUFLAGS-1 += $(call cc-option,-mcpu=v$(CPU_VER))
--
1.7.1
next prev parent reply other threads:[~2017-07-06 16:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-06 16:34 [PATCH v3 0/3] Define CPU_BIG_ENDIAN or warn for inconsistencies Babu Moger
2017-07-06 16:34 ` [PATCH v3 1/3] arch: Define CPU_BIG_ENDIAN for all fixed big endian archs Babu Moger
2017-07-06 16:34 ` Babu Moger [this message]
2017-07-06 16:34 ` [PATCH v3 3/3] include: warn for inconsistent endian config definition Babu Moger
2017-08-29 6:30 ` [PATCH v3 0/3] Define CPU_BIG_ENDIAN or warn for inconsistencies Greg KH
2017-08-29 9:04 ` Peter Zijlstra
-- strict thread matches above, loose matches on Subject: below --
2017-06-12 22:09 Babu Moger
2017-06-12 22:09 ` [PATCH v3 2/3] arch/microblaze: Add choice for endianness and update Makefile Babu Moger
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=1499358861-179979-3-git-send-email-babu.moger@oracle.com \
--to=babu.moger@oracle.com \
--cc=davem@davemloft.net \
--cc=deller@gmx.de \
--cc=geert@linux-m68k.org \
--cc=gregkh@linuxfoundation.org \
--cc=jcmvbkbc@gmail.com \
--cc=jejb@parisc-linux.org \
--cc=jonas@southpole.se \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@vger.kernel.org \
--cc=linux-parisc@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=monstr@monstr.eu \
--cc=mpe@ellerman.id.au \
--cc=openrisc@lists.librecores.org \
--cc=peterz@infradead.org \
--cc=shorne@gmail.com \
--cc=sparclinux@vger.kernel.org \
--cc=stefan.kristiansson@saunalahti.fi \
--cc=uclinux-h8-devel@lists.sourceforge.jp \
--cc=viro@zeniv.linux.org.uk \
--cc=ysato@users.sourceforge.jp \
/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).