From: Franck Bui-Huu <vagabon.xyz@gmail.com>
To: ralf@linux-mips.org
Cc: linux-mips@linux-mips.org, anemo@mba.ocn.ne.jp, macro@linux-mips.org
Subject: [PATCH 3/3] Rename CONFIG_BUILD_ELF64 into CONFIG_64BIT_BUILD_ELF32
Date: Tue, 13 Feb 2007 10:18:09 +0100 [thread overview]
Message-ID: <11713582901252-git-send-email-fbuihuu@gmail.com> (raw)
In-Reply-To: <1171358289786-git-send-email-fbuihuu@gmail.com>
From: Franck Bui-Huu <fbuihuu@gmail.com>
Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
---
arch/mips/Makefile | 6 ++----
include/asm-mips/page.h | 2 +-
include/asm-mips/pgtable-64.h | 2 +-
include/asm-mips/stackframe.h | 12 ++++++------
4 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 626771c..fa08d07 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -625,11 +625,9 @@ ifdef CONFIG_64BIT
endif
ifeq ("$(BUILD_ELF32)", "y")
- cflags-y += -msym32
- else
- cflags-y += -DCONFIG_BUILD_ELF64
+ cflags-y += -msym32 -DCONFIG_64BIT_BUILD_ELF32
endif
-endif # CONFIG_64BIT
+endif
AFLAGS += $(cflags-y)
CFLAGS += $(cflags-y)
diff --git a/include/asm-mips/page.h b/include/asm-mips/page.h
index d3fbd83..d37a24c 100644
--- a/include/asm-mips/page.h
+++ b/include/asm-mips/page.h
@@ -149,7 +149,7 @@ typedef struct { unsigned long pgprot; } pgprot_t;
/*
* __pa()/__va() should be used only during mem init.
*/
-#if defined(CONFIG_64BIT) && !defined(CONFIG_BUILD_ELF64)
+#ifdef CONFIG_64BIT_BUILD_ELF32
#define __pa_page_offset(x) ((unsigned long)(x) < CKSEG0 ? PAGE_OFFSET : CKSEG0)
#else
#define __pa_page_offset(x) PAGE_OFFSET
diff --git a/include/asm-mips/pgtable-64.h b/include/asm-mips/pgtable-64.h
index a5b1871..55be7b5 100644
--- a/include/asm-mips/pgtable-64.h
+++ b/include/asm-mips/pgtable-64.h
@@ -104,7 +104,7 @@
#define VMALLOC_START MAP_BASE
#define VMALLOC_END \
(VMALLOC_START + PTRS_PER_PGD * PTRS_PER_PMD * PTRS_PER_PTE * PAGE_SIZE)
-#if defined(CONFIG_MODULES) && !defined(CONFIG_BUILD_ELF64) && \
+#if defined(CONFIG_MODULES) && defined(CONFIG_64BIT_BUILD_ELF32) && \
VMALLOC_START != CKSSEG
/* Load modules into 32bit-compatible segment. */
#define MODULE_START CKSSEG
diff --git a/include/asm-mips/stackframe.h b/include/asm-mips/stackframe.h
index 1fae5dc..917ffa5 100644
--- a/include/asm-mips/stackframe.h
+++ b/include/asm-mips/stackframe.h
@@ -70,14 +70,14 @@
#else
MFC0 k0, CP0_CONTEXT
#endif
-#if defined(CONFIG_BUILD_ELF64) || (defined(CONFIG_64BIT) && __GNUC__ < 4)
+#if defined(CONFIG_32BIT) || defined(CONFIG_64BIT_BUILD_ELF32)
+ lui k1, %hi(kernelsp)
+#else
lui k1, %highest(kernelsp)
daddiu k1, %higher(kernelsp)
dsll k1, 16
daddiu k1, %hi(kernelsp)
dsll k1, 16
-#else
- lui k1, %hi(kernelsp)
#endif
LONG_SRL k0, PTEBASE_SHIFT
LONG_ADDU k1, k0
@@ -95,14 +95,14 @@
.endm
#else
.macro get_saved_sp /* Uniprocessor variation */
-#if defined(CONFIG_BUILD_ELF64) || (defined(CONFIG_64BIT) && __GNUC__ < 4)
+#if defined(CONFIG_32BIT) || defined(CONFIG_64BIT_BUILD_ELF32)
+ lui k1, %hi(kernelsp)
+#else
lui k1, %highest(kernelsp)
daddiu k1, %higher(kernelsp)
dsll k1, k1, 16
daddiu k1, %hi(kernelsp)
dsll k1, k1, 16
-#else
- lui k1, %hi(kernelsp)
#endif
LONG_L k1, %lo(kernelsp)(k1)
.endm
--
1.4.4.3.ge6d4
prev parent reply other threads:[~2007-02-13 9:21 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-13 9:18 [RFC] Kill CONFIG_BUILD_ELF64 from Kconfig Franck Bui-Huu
2007-02-13 9:18 ` [PATCH 1/3] Remove '-mno-explicit-relocs' option when CONFIG_BUILD_ELF64 Franck Bui-Huu
2007-02-13 9:18 ` [PATCH 2/3] Automatically set CONFIG_BUILD_ELF64 Franck Bui-Huu
2007-02-13 16:12 ` Atsushi Nemoto
2007-02-13 17:02 ` Franck Bui-Huu
2007-02-13 16:18 ` Ralf Baechle
2007-02-13 17:09 ` Franck Bui-Huu
2007-02-13 20:05 ` Franck Bui-Huu
2007-02-14 1:28 ` Atsushi Nemoto
2007-02-14 8:20 ` Franck Bui-Huu
2007-02-14 16:14 ` Atsushi Nemoto
2007-02-15 8:36 ` Franck Bui-Huu
2007-02-14 11:42 ` Maciej W. Rozycki
2007-02-13 9:18 ` Franck Bui-Huu [this message]
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=11713582901252-git-send-email-fbuihuu@gmail.com \
--to=vagabon.xyz@gmail.com \
--cc=anemo@mba.ocn.ne.jp \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.