]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[MIPS] Rename CONFIG_BUILD_ELF64 into KBUILD_64BIT_SYM32
authorFranck Bui-Huu <vagabon.xyz@gmail.com>
Thu, 15 Feb 2007 13:21:36 +0000 (14:21 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 11 Oct 2007 22:45:59 +0000 (23:45 +0100)
This patch renames it for 3 reasons:

    - "CONFIG" pattern is used by Kconfig. Now this macro is
      no more defined by Kconfig but by Kbuild itself make this
      clear by translating "CONFIG" into "KBUILD".

    - "ELF32" word is improper because it is irrelevant to ELF
      format and it makes confusion with CONFIG_BOOT_ELF32. So
      translate it with SYM32.

    - Add "64BIT" part to make clear that this macro implies a
      64 bits kernel.

Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/Makefile
include/asm-mips/page.h
include/asm-mips/pgtable-64.h
include/asm-mips/stackframe.h

index 4337c492ed1b2567b93594022a849f6b90945961..ce7e02e613a76e249c8a42e3149810111e178dd6 100644 (file)
@@ -577,19 +577,17 @@ endif
 # Automatically detect the build format. By default we choose
 # the elf format according to the load address.
 # We can always force a build with a 64-bits symbol format by
-# passing 'BUILD_ELF32=no' option to the make's command line.
+# passing 'KBUILD_SYM32=no' option to the make's command line.
 #
 ifdef CONFIG_64BIT
-  ifndef BUILD_ELF32
+  ifndef KBUILD_SYM32
     ifeq ($(shell expr $(load-y) \< 0xffffffff80000000), 0)
-      BUILD_ELF32 = y
+      KBUILD_SYM32 = y
     endif
   endif
 
-  ifeq ($(BUILD_ELF32), y)
-    cflags-y += -msym32
-  else
-    cflags-y += -DCONFIG_BUILD_ELF64
+  ifeq ($(KBUILD_SYM32), y)
+    cflags-y += -msym32 -DKBUILD_64BIT_SYM32
   endif
 endif
 
index b92dd8c760da5d8a600f6abb33bd62b9bc6c1146..c90fe560a0d9faefa4bdafa6dad0080857ef5ee7 100644 (file)
@@ -142,7 +142,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 KBUILD_64BIT_SYM32
 #define __pa(x)                                                                \
 ({                                                                     \
     unsigned long __x = (unsigned long)(x);                            \
index 49f5a1a2dfcdadc49bd23e40c1f33786b52f469a..a8aed9c6a1598dec8b6c97c33d7589c100fd49ea 100644 (file)
 #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(KBUILD_64BIT_SYM32) && \
        VMALLOC_START != CKSSEG
 /* Load modules into 32bit-compatible segment. */
 #define MODULE_START   CKSSEG
index ed33366b85b8cf782f79a854495c5b24df9908de..59334f598b786ad53a2e0aed1289d64aaa789b93 100644 (file)
 #else
                MFC0    k0, CP0_CONTEXT
 #endif
-#if defined(CONFIG_BUILD_ELF64) || (defined(CONFIG_64BIT) && __GNUC__ < 4)
+#if defined(CONFIG_32BIT) || defined(KBUILD_64BIT_SYM32)
+               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
                .endm
 #else
                .macro  get_saved_sp    /* Uniprocessor variation */
-#if defined(CONFIG_BUILD_ELF64) || (defined(CONFIG_64BIT) && __GNUC__ < 4)
+#if defined(CONFIG_32BIT) || defined(KBUILD_64BIT_SYM32)
+               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