ARM: zx: fix building with CONFIG_THUMB2_KERNEL
Subsystems (2)
PATCH 1/1 ARM: zx: fix building with CONFIG_THUMB2_KERNEL
The newly added zx platform causes a build error when CONFIG_THUMB2_KERNEL is enabled:
arch/arm/mach-zx/headsmp.S:16: Error: invalid immediate for address calculation (value = 0x00000004)
I'm assuming that the ROM code that is calling these entry points runs in ARM mode, so there would be another problem in the same file, and we can solve both problems at once by adding a '.arm' statement that will make zx_resume_jump and zx_secondary_startup both be built as ARM code.
---
Hi Jun,
This patch fixes a build error with mach-zx, but I don't know if it's actually correct. Can you check if the machine correctly boots with this patch enabled and CONFIG_THUMB2_KERNEL=y set in the .config?
arch/arm/mach-zx/headsmp.S +1 -0
@@ -10,6 +10,7 @@ #include <linux/linkage.h> .align 3 + .arm /* It runs from physical address */ ENTRY(zx_resume_jump)
PATCH 1/1 ARM: zx: fix building with CONFIG_THUMB2_KERNEL
2015-05-21 16:36 GMT+08:00 Arnd Bergmann <[email protected]>:
Quoted 11 lines
The newly added zx platform causes a build error when
CONFIG_THUMB2_KERNELis enabled:
arch/arm/mach-zx/headsmp.S:16: Error: invalid immediate for address calculation (value =0x00000004)I'm assuming that the ROM code that is calling these entry points runs in ARM mode, so there would be another problem in the same file, and we can solve both problems at once by adding a '.arm' statement that will make
zx_resume_jumpandzx_secondary_startupboth be built as ARM code.
Quoted 8 lines
Signed-off-by Arnd Bergmann <[email protected]>---
Hi Jun,This patch fixes a build error with mach-zx, but I don't know if it's actually correct. Can you check if the machine correctly boots with this patch enabled and
CONFIG_THUMB2_KERNEL=yset in the .config?
Arnd,
I add CONFIG_THUMB2_KERNEL=y in defconfig and reproduce the build error. Your change does fix the bug and boot/cpu_hotplug works well. Thanks for your work!
Jun
Quoted 13 lines
arch/arm/mach-zx/headsmp.S +1
-0@@ -10,6 +10,7 @@ #include <linux/linkage.h> .align 3 + .arm /* It runs from physical address */ ENTRY(zx_resume_jump)
PATCH 1/1 ARM: zx: fix building with CONFIG_THUMB2_KERNEL
Quoted 20 lines · On Thursday 21 May 2015 21:04:34 Jun Nie wrote:
2015-05-21 16:36 GMT+08:00 Arnd Bergmann <[email protected]>:
Quoted 11 lines
The newly added zx platform causes a build error when
CONFIG_THUMB2_KERNELis enabled:
arch/arm/mach-zx/headsmp.S:16: Error: invalid immediate for address calculation (value =0x00000004)I'm assuming that the ROM code that is calling these entry points runs in ARM mode, so there would be another problem in the same file, and we can solve both problems at once by adding a '.arm' statement that will make
zx_resume_jumpandzx_secondary_startupboth be built as ARM code.Quoted 8 lines
Signed-off-by Arnd Bergmann <[email protected]>---
Hi Jun,This patch fixes a build error with mach-zx, but I don't know if it's actually correct. Can you check if the machine correctly boots with this patch enabled and
CONFIG_THUMB2_KERNEL=yset in the .config?
Quoted 6 lines
Arnd,
I add
CONFIG_THUMB2_KERNEL=yin defconfig and reproduce the build error. Your change does fix the bug and boot/cpu_hotplug works well. Thanks for your work!
Ok, thanks for testing, I've applied the patch to next/soc now.
Arnd