linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: Exynos : Fix build error with thumb2
@ 2014-05-26 15:53 Santosh Shukla
  2014-05-28 14:03 ` Santosh Shukla
  2014-06-02 10:10 ` Dave Martin
  0 siblings, 2 replies; 6+ messages in thread
From: Santosh Shukla @ 2014-05-26 15:53 UTC (permalink / raw)
  To: linux-arm-kernel

From: santosh shukla <santosh.shukla@linaro.org>

Add non-global symbol .LLl2x0_regs_phys to avoid build break in thumb2 mode.

IIUC, arm assembler fail to load value of "global" variable
l2xo_regs_phys for thum2 mode and wrapping it in non-global symbol like
.Ll2x0_regs_phys solves the build break issue.

arch/arm/mach-exynos/sleep.S: Assembler messages:
arch/arm/mach-exynos/sleep.S:57: Error: invalid immediate for address
calculation (value = 0x00000004)

fix inspired from [1]

[1] https://lkml.org/lkml/2010/3/31/235

Signed-off-by: santosh shukla <santosh.shukla@linaro.org>
---
 arch/arm/mach-exynos/sleep.S |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-exynos/sleep.S b/arch/arm/mach-exynos/sleep.S
index a2613e9..dc8c6b6 100644
--- a/arch/arm/mach-exynos/sleep.S
+++ b/arch/arm/mach-exynos/sleep.S
@@ -54,7 +54,7 @@ ENTRY(exynos_cpu_resume)
 	ldr	r1, =CPU_CORTEX_A9
 	cmp	r0, r1
 	bne	skip_l2_resume
-	adr	r0, l2x0_regs_phys
+	adr	r0, .Ll2x0_regs_phys
 	ldr	r0, [r0]
 	cmp	r0, #0
 	beq	skip_l2_resume
@@ -79,6 +79,8 @@ skip_l2_resume:
 	b	cpu_resume
 ENDPROC(exynos_cpu_resume)
 #ifdef CONFIG_CACHE_L2X0
+
+.Ll2x0_regs_phys:
 	.globl l2x0_regs_phys
 l2x0_regs_phys:
 	.long	0
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [PATCH] ARM: Exynos: Fix build error with thumb2
@ 2015-03-16 17:38 Andrey Konovalov
  0 siblings, 0 replies; 6+ messages in thread
From: Andrey Konovalov @ 2015-03-16 17:38 UTC (permalink / raw)
  To: linux-arm-kernel

Add non-global symbols to avoid build failure in thumb2 mode.

Exact the same issue and the fix as in [1]; just the variables are different.

[1] http://lists.linaro.org/pipermail/linaro-kernel/2014-June/015227.html

Signed-off-by: Andrey Konovalov <andrey.konovalov@linaro.org>
---
  arch/arm/mach-exynos/sleep.S | 6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-exynos/sleep.S b/arch/arm/mach-exynos/sleep.S
index 31d2583..73f7fde 100644
--- a/arch/arm/mach-exynos/sleep.S
+++ b/arch/arm/mach-exynos/sleep.S
@@ -69,9 +69,9 @@ ENTRY(exynos_cpu_resume_ns)
  	cmp	r0, r1
  	bne	skip_cp15

-	adr	r0, cp15_save_power
+	adr	r0, .Lcp15_save_power
  	ldr	r1, [r0]
-	adr	r0, cp15_save_diag
+	adr	r0, .Lcp15_save_diag
  	ldr	r2, [r0]
  	mov	r0, #SMC_CMD_C15RESUME
  	dsb
@@ -118,9 +118,11 @@ skip_l2x0:
  skip_cp15:
  	b	cpu_resume
  ENDPROC(exynos_cpu_resume_ns)
+.Lcp15_save_diag:
  	.globl cp15_save_diag
  cp15_save_diag:
  	.long	0	@ cp15 diagnostic
+.Lcp15_save_power:
  	.globl cp15_save_power
  cp15_save_power:
  	.long	0	@ cp15 power control
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-03-16 17:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-26 15:53 [PATCH] ARM: Exynos : Fix build error with thumb2 Santosh Shukla
2014-05-28 14:03 ` Santosh Shukla
2014-06-02 10:10 ` Dave Martin
2014-06-04  8:07   ` Santosh Shukla
2014-06-11 15:13     ` Kukjin Kim
  -- strict thread matches above, loose matches on Subject: below --
2015-03-16 17:38 [PATCH] ARM: Exynos: " Andrey Konovalov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).