linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: ankit.jindal@linaro.org (Ankit Jindal)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 1/4] ARM64: Add Kconfig option to enable Big Endian kernel
Date: Fri, 11 Oct 2013 17:52:12 +0530	[thread overview]
Message-ID: <1381494135-15085-2-git-send-email-ankit.jindal@linaro.org> (raw)
In-Reply-To: <1381494135-15085-1-git-send-email-ankit.jindal@linaro.org>

This patch adds Kconfig options and relevant Big Endian compiler flags.

Signed-off-by: Ankit Jindal <ankit.jindal@linaro.org>
Signed-off-by: Tushar Jagad <tushar.jagad@linaro.org>
---
 arch/arm64/Kconfig    |    2 ++
 arch/arm64/Makefile   |    7 +++++++
 arch/arm64/mm/Kconfig |    7 +++++++
 3 files changed, 16 insertions(+)
 create mode 100644 arch/arm64/mm/Kconfig

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index f558058..2214ab9 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -285,6 +285,8 @@ config SYSVIPC_COMPAT
 
 endmenu
 
+source "arch/arm64/mm/Kconfig"
+
 source "net/Kconfig"
 
 source "drivers/Kconfig"
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
index d90cf79..c92b0f9 100644
--- a/arch/arm64/Makefile
+++ b/arch/arm64/Makefile
@@ -20,9 +20,16 @@ LIBGCC 		:= $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
 KBUILD_DEFCONFIG := defconfig
 
 KBUILD_CFLAGS	+= -mgeneral-regs-only
+
+ifeq ($(CONFIG_CPU_BIG_ENDIAN),y)
+KBUILD_CPPFLAGS += -mbig-endian
+AS              += -EB
+LD              += -EB
+else
 KBUILD_CPPFLAGS	+= -mlittle-endian
 AS		+= -EL
 LD		+= -EL
+endif
 
 comma = ,
 
diff --git a/arch/arm64/mm/Kconfig b/arch/arm64/mm/Kconfig
new file mode 100644
index 0000000..e4122ac
--- /dev/null
+++ b/arch/arm64/mm/Kconfig
@@ -0,0 +1,7 @@
+config CPU_BIG_ENDIAN
+        bool "Build big-endian kernel"
+        help
+          Say Y if you plan on running a kernel in big-endian mode.
+          Note that your board must be properly built and your board
+          port must properly enable any big-endian related features
+          of your chipset/board/processor.
-- 
1.7.9.5

  reply	other threads:[~2013-10-11 12:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-11 12:22 [RFC PATCH 0/4] Big Endian support for ARM64 kernel Ankit Jindal
2013-10-11 12:22 ` Ankit Jindal [this message]
2013-10-15 18:09   ` [RFC PATCH 1/4] ARM64: Add Kconfig option to enable Big Endian kernel Christopher Covington
2013-10-16  6:49     ` Tushar Jagad
2013-10-16 14:30       ` Christopher Covington
2013-10-11 12:22 ` [RFC PATCH 2/4] ARM64: Include appropriate byteorder for Big Endian Ankit Jindal
2013-10-11 12:22 ` [RFC PATCH 3/4] ARM64: Big Endian fixes for kernel booting Ankit Jindal
2013-10-11 12:52   ` Ankit Jindal
2013-10-15 18:24   ` Christopher Covington
2013-10-16  7:04     ` Tushar Jagad
2013-10-11 12:22 ` [RFC PATCH 4/4] ARM64: Support for 32-bit big endian userspace Ankit Jindal
2013-10-15 18:09 ` [RFC PATCH 0/4] Big Endian support for ARM64 kernel Christopher Covington
2013-10-16  8:05   ` Tushar Jagad
2013-10-16 14:40     ` Christopher Covington

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=1381494135-15085-2-git-send-email-ankit.jindal@linaro.org \
    --to=ankit.jindal@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.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).