Skip to contentSkip to conversation

powerpc: Disable RELOCATABLE for COMPILE_TEST with PPC64

PATCH In review Guenter Roeck 4 participants 7 messages Jun 30, 2014 – Jul 13, 2014 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc: Disable RELOCATABLE for COMPILE_TEST with PPC64

powerpc:allmodconfig has been failing for some time with the following error.

arch/powerpc/kernel/exceptions-64s.S: Assembler messages:
arch/powerpc/kernel/exceptions-64s.S:1312: Error: attempt to move .org backwards make[1]: *** [arch/powerpc/kernel/head_64.o] Error 1

A number of attempts to fix the problem by moving around code have been unsuccessful and resulted in failed builds for some configurations and the discovery of toolchain bugs.

Fix the problem by disabling RELOCATABLE for COMPILE_TEST builds instead. While this is less than perfect, it avoids substantial code changes which would otherwise be necessary just to make COMPILE_TEST builds happy and might have undesired side effects.

---
 arch/powerpc/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/powerpc/Kconfig +2 -1
index bd6dd6e..fefe7c8 100644
@@ -414,7 +414,7 @@ config KEXEC
 config CRASH_DUMP
 	bool "Build a kdump crash kernel"
 	depends on PPC64 || 6xx || FSL_BOOKE || (44x && !SMP)
-	select RELOCATABLE if PPC64 || 44x || FSL_BOOKE
+	select RELOCATABLE if (PPC64 && !COMPILE_TEST) || 44x || FSL_BOOKE
 	help
 	  Build a kernel suitable for use as a kdump capture kernel.
 	  The same kernel binary can be used as production kernel and dump
@@ -1017,6 +1017,7 @@ endmenu
 if PPC64
 config RELOCATABLE
 	bool "Build a relocatable kernel"
+	depends on !COMPILE_TEST
 	select NONSTATIC_KERNEL
 	help
 	  This builds a kernel image that is capable of running anywhere
Signature · 1 line
1.9.1
#1 lore raw

Hi Guenter,

Quoted 12 lines · On Mon, 30 Jun 2014 11:45:30 -0700 Guenter Roeck <[email protected]> wrote:

powerpc:allmodconfig has been failing for some time with the following error.

arch/powerpc/kernel/exceptions-64s.S: Assembler messages:
arch/powerpc/kernel/exceptions-64s.S:1312: Error: attempt to move .org backwards make[1]: *** [arch/powerpc/kernel/head_64.o] Error 1

A number of attempts to fix the problem by moving around code have been unsuccessful and resulted in failed builds for some configurations and the discovery of toolchain bugs.

Quoted 6 lines

Fix the problem by disabling RELOCATABLE for COMPILE_TEST builds instead. While this is less than perfect, it avoids substantial code changes which would otherwise be necessary just to make COMPILE_TEST builds happy and might have undesired side effects.

I'll dump this in my "fixes" tree today and see how it goes.

Thanks.

Signature · 2 lines
Cheers,
Stephen Rothwell                    [email protected]
#2 lore raw
Quoted 16 lines · Stephen Rothwell

Hi Guenter,

Quoted 13 lines · On Mon, 30 Jun 2014 11:45:30 -0700 Guenter Roeck <[email protected]> wrote:

powerpc:allmodconfig has been failing for some time with the following error.

arch/powerpc/kernel/exceptions-64s.S: Assembler messages:
arch/powerpc/kernel/exceptions-64s.S:1312: Error: attempt to move .org backwards make[1]: *** [arch/powerpc/kernel/head_64.o] Error 1

A number of attempts to fix the problem by moving around code have been unsuccessful and resulted in failed builds for some configurations and the discovery of toolchain bugs.

Fix the problem by disabling RELOCATABLE for COMPILE_TEST builds instead.

s/Fix/Work around/

would probably be a better here.

Quoted 8 lines
Quoted 5 lines

While this is less than perfect, it avoids substantial code changes which would otherwise be necessary just to make COMPILE_TEST builds happy and might have undesired side effects.

I'll dump this in my "fixes" tree today and see how it goes.

Would be great. Note that allyescconfig still fails with relocation errors after this patch has been applied.

Thanks,
Guenter

#3 lore raw
In reply to Guenter Roeck

ping ...

Guenter

Quoted 43 lines · Guenter Roeck

powerpc:allmodconfig has been failing for some time with the following error.

arch/powerpc/kernel/exceptions-64s.S: Assembler messages:
arch/powerpc/kernel/exceptions-64s.S:1312: Error: attempt to move .org backwards make[1]: *** [arch/powerpc/kernel/head_64.o] Error 1

A number of attempts to fix the problem by moving around code have been unsuccessful and resulted in failed builds for some configurations and the discovery of toolchain bugs.

Fix the problem by disabling RELOCATABLE for COMPILE_TEST builds instead. While this is less than perfect, it avoids substantial code changes which would otherwise be necessary just to make COMPILE_TEST builds happy and might have undesired side effects.

---
  arch/powerpc/Kconfig | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
arch/powerpc/Kconfig +2 -1
index bd6dd6e..fefe7c8 100644
@@ -414,7 +414,7 @@ config KEXEC
  config CRASH_DUMP
  	bool "Build a kdump crash kernel"
  	depends on PPC64 || 6xx || FSL_BOOKE || (44x && !SMP)
-	select RELOCATABLE if PPC64 || 44x || FSL_BOOKE
+	select RELOCATABLE if (PPC64 && !COMPILE_TEST) || 44x || FSL_BOOKE
  	help
  	  Build a kernel suitable for use as a kdump capture kernel.
  	  The same kernel binary can be used as production kernel and dump
@@ -1017,6 +1017,7 @@ endmenu
  if PPC64
  config RELOCATABLE
  	bool "Build a relocatable kernel"
+	depends on !COMPILE_TEST
  	select NONSTATIC_KERNEL
  	help
  	  This builds a kernel image that is capable of running anywhere
#4 lore raw
In reply to Guenter Roeck

ping ...

Ben, I know this is not perfect, but on the other side it is simple and would be easy to backport. With this in place, a complete/clean fix would not be as urgent. Any chance to get it applied ?

Nick, this doesn't fix the allyesconfig build - it still fails with relocation errors. But it does fix the allmodconfig build.

Thanks,
Guenter

Quoted 43 lines · Guenter Roeck

powerpc:allmodconfig has been failing for some time with the following error.

arch/powerpc/kernel/exceptions-64s.S: Assembler messages:
arch/powerpc/kernel/exceptions-64s.S:1312: Error: attempt to move .org backwards make[1]: *** [arch/powerpc/kernel/head_64.o] Error 1

A number of attempts to fix the problem by moving around code have been unsuccessful and resulted in failed builds for some configurations and the discovery of toolchain bugs.

Fix the problem by disabling RELOCATABLE for COMPILE_TEST builds instead. While this is less than perfect, it avoids substantial code changes which would otherwise be necessary just to make COMPILE_TEST builds happy and might have undesired side effects.

---
  arch/powerpc/Kconfig | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
arch/powerpc/Kconfig +2 -1
index bd6dd6e..fefe7c8 100644
@@ -414,7 +414,7 @@ config KEXEC
  config CRASH_DUMP
  	bool "Build a kdump crash kernel"
  	depends on PPC64 || 6xx || FSL_BOOKE || (44x && !SMP)
-	select RELOCATABLE if PPC64 || 44x || FSL_BOOKE
+	select RELOCATABLE if (PPC64 && !COMPILE_TEST) || 44x || FSL_BOOKE
  	help
  	  Build a kernel suitable for use as a kdump capture kernel.
  	  The same kernel binary can be used as production kernel and dump
@@ -1017,6 +1017,7 @@ endmenu
  if PPC64
  config RELOCATABLE
  	bool "Build a relocatable kernel"
+	depends on !COMPILE_TEST
  	select NONSTATIC_KERNEL
  	help
  	  This builds a kernel image that is capable of running anywhere
#5 lore raw
Quoted 5 lines · Guenter Roeck

ping ...

Ben, I know this is not perfect, but on the other side it is simple and would be easy to backport. With this in place, a complete/clean fix would not be as urgent. Any chance to get it applied ?

Yes, that definitely helps, I'll include it as a band aid.

Cheers,
Ben.

Quoted 56 lines

Nick, this doesn't fix the allyesconfig build - it still fails with relocation errors. But it does fix the allmodconfig build.

Thanks,
Guenter

Quoted 36 lines · Guenter Roeck

powerpc:allmodconfig has been failing for some time with the following error.

arch/powerpc/kernel/exceptions-64s.S: Assembler messages:
arch/powerpc/kernel/exceptions-64s.S:1312: Error: attempt to move .org backwards make[1]: *** [arch/powerpc/kernel/head_64.o] Error 1

A number of attempts to fix the problem by moving around code have been unsuccessful and resulted in failed builds for some configurations and the discovery of toolchain bugs.

Fix the problem by disabling RELOCATABLE for COMPILE_TEST builds instead. While this is less than perfect, it avoids substantial code changes which would otherwise be necessary just to make COMPILE_TEST builds happy and might have undesired side effects.

---
  arch/powerpc/Kconfig | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
arch/powerpc/Kconfig +1 -1
index bd6dd6e..fefe7c8 100644
@@ -414,7 +414,7 @@ config KEXEC
  config CRASH_DUMP
  	bool "Build a kdump crash kernel"
  	depends on PPC64 || 6xx || FSL_BOOKE || (44x && !SMP)
-	select RELOCATABLE if PPC64 || 44x || FSL_BOOKE
+	select RELOCATABLE if (PPC64 && !COMPILE_TEST) || 44x || FSL_BOOKE
  	help
  	  Build a kernel suitable for use as a kdump capture kernel.
  	  The same kernel binary can be used as production kernel and dump

arch/powerpc/Kconfig endmenu · line 1023

Quoted 7 lines
arch/powerpc/Kconfig +1 -0
@@ -1017,6 +1017,7 @@ endmenu
  if PPC64
  config RELOCATABLE
  	bool "Build a relocatable kernel"
+	depends on !COMPILE_TEST
  	select NONSTATIC_KERNEL
  	help
  	  This builds a kernel image that is capable of running anywhere

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

#6 lore raw
Quoted 70 lines · Benjamin Herrenschmidt
Quoted 5 lines · Guenter Roeck

ping ...

Ben, I know this is not perfect, but on the other side it is simple and would be easy to backport. With this in place, a complete/clean fix would not be as urgent. Any chance to get it applied ?

Yes, that definitely helps, I'll include it as a band aid.

Cheers,
Ben.

Quoted 56 lines

Nick, this doesn't fix the allyesconfig build - it still fails with relocation errors. But it does fix the allmodconfig build.

Thanks,
Guenter

Quoted 36 lines · Guenter Roeck

powerpc:allmodconfig has been failing for some time with the following error.

arch/powerpc/kernel/exceptions-64s.S: Assembler messages:
arch/powerpc/kernel/exceptions-64s.S:1312: Error: attempt to move .org backwards make[1]: *** [arch/powerpc/kernel/head_64.o] Error 1

A number of attempts to fix the problem by moving around code have been unsuccessful and resulted in failed builds for some configurations and the discovery of toolchain bugs.

Fix the problem by disabling RELOCATABLE for COMPILE_TEST builds instead. While this is less than perfect, it avoids substantial code changes which would otherwise be necessary just to make COMPILE_TEST builds happy and might have undesired side effects.

---
  arch/powerpc/Kconfig | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
arch/powerpc/Kconfig +1 -1
index bd6dd6e..fefe7c8 100644
@@ -414,7 +414,7 @@ config KEXEC
  config CRASH_DUMP
    bool "Build a kdump crash kernel"
    depends on PPC64 || 6xx || FSL_BOOKE || (44x && !SMP)
-   select RELOCATABLE if PPC64 || 44x || FSL_BOOKE
+   select RELOCATABLE if (PPC64 && !COMPILE_TEST) || 44x || FSL_BOOKE
    help
      Build a kernel suitable for use as a kdump capture kernel.
      The same kernel binary can be used as production kernel and dump

arch/powerpc/Kconfig endmenu · line 1023

Quoted 7 lines
arch/powerpc/Kconfig +1 -0
@@ -1017,6 +1017,7 @@ endmenu
  if PPC64
  config RELOCATABLE
    bool "Build a relocatable kernel"
+   depends on !COMPILE_TEST
    select NONSTATIC_KERNEL
    help
      This builds a kernel image that is capable of running anywhere

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Thanks for applying the patch. Works for me too.Sorry about the late reply working on other build
issues and fix me messages.
Nick