Re: [PATCH]: Remove CONFIG_BUILD_ELF64 entirely

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Atsushi Nemoto wrote:
On Sun, 25 Mar 2007 12:59:32 -0400, Kumba <kumba@xxxxxxxxxx> wrote:
So I think Franck's approach, which enables -msym32 and defines
KBUILD_64BIT_SYM32 automatically if load-y was CKSEG0, is better.  Are
there any problem with his patchset?
I missed the other two additions to this patch, which is probably why it didn't work :) Taken as a whole, they also boot my O2 now.

Thanks, good news!

And Ralf's number shows that we can use -msym32 even for IP27.
Another good news.

Actually, I just realized I didn't rehash my dhcpd, so it booted the wrong kernel. A kernel built with this patchset won't boot without the following change in include/asm-mips/stackframe.h:

--- include/asm-mips/stackframe.h.orig	2007-03-25 14:22:04.000000000 -0400
+++ include/asm-mips/stackframe.h	2007-03-25 14:22:21.000000000 -0400
@@ -70,7 +70,7 @@
 #else
 		MFC0	k0, CP0_CONTEXT
 #endif
-#if defined(CONFIG_32BIT) || defined(KBUILD_64BIT_SYM32)
+#if defined(CONFIG_32BIT) || !defined(KBUILD_64BIT_SYM32)
 		lui	k1, %hi(kernelsp)
 #else
 		lui	k1, %highest(kernelsp)
@@ -95,7 +95,7 @@
 		.endm
 #else
 		.macro	get_saved_sp	/* Uniprocessor variation */
-#if defined(CONFIG_32BIT) || defined(KBUILD_64BIT_SYM32)
+#if defined(CONFIG_32BIT) || !defined(KBUILD_64BIT_SYM32)
 		lui	k1, %hi(kernelsp)
 #else
 		lui	k1, %highest(kernelsp)




You'll just get a silent hang after ARCS jumps into the kernel. My guess is these systems need the extra asm commands. Perhaps the use of CONFIG_32BIT is incorrect?

Maybe we should use the older form instead, with appropriate change?

--- include/asm-mips/stackframe.h.orig	2007-03-25 14:22:04.000000000 -0400
+++ include/asm-mips/stackframe.h.2	2007-03-25 14:30:01.000000000 -0400
@@ -70,14 +70,14 @@
 #else
 		MFC0	k0, CP0_CONTEXT
 #endif
-#if defined(CONFIG_32BIT) || defined(KBUILD_64BIT_SYM32)
-		lui	k1, %hi(kernelsp)
-#else
+#if defined(CONFIG_64BIT) || defined(KBUILD_64BIT_SYM32)
 		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_32BIT) || defined(KBUILD_64BIT_SYM32)
-		lui	k1, %hi(kernelsp)
-#else
+#if defined(CONFIG_64BIT) || defined(KBUILD_64BIT_SYM32)
 		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



--Kumba

--
Gentoo/MIPS Team Lead

"Such is oft the course of deeds that move the wheels of the world: small hands do them because they must, while the eyes of the great are elsewhere." --Elrond


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux