diff mbox

arm: socfpga: fix build break for allyesconfig

Message ID 1351289861-16297-1-git-send-email-dinguyen@altera.com (mailing list archive)
State New, archived
Headers show

Commit Message

Dinh Nguyen Oct. 26, 2012, 10:17 p.m. UTC
From: Dinh Nguyen <dinguyen@altera.com>

Add check for armv7 in headsmp.S.

Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
---
 arch/arm/mach-socfpga/headsmp.S |    2 ++
 1 file changed, 2 insertions(+)

Comments

Arnd Bergmann Oct. 26, 2012, 9:26 p.m. UTC | #1
On Friday 26 October 2012, dinguyen@altera.com wrote:
>  ENTRY(secondary_trampoline)
> +#if __LINUX_ARM_ARCH__ >= 7
>         movw    r0, #:lower16:CPU1_START_ADDR
>         movt  r0, #:upper16:CPU1_START_ADDR
> +#endif

I don't think this is the right fix, because it will break
running on SMP socfpga machines if you enable both socfpga
and picoxcell in a multiplatform configuration.

	Arnd
Russell King - ARM Linux Oct. 26, 2012, 9:51 p.m. UTC | #2
On Fri, Oct 26, 2012 at 04:17:41PM -0600, dinguyen@altera.com wrote:
> From: Dinh Nguyen <dinguyen@altera.com>
> 
> Add check for armv7 in headsmp.S.
> 
> Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
> ---
>  arch/arm/mach-socfpga/headsmp.S |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/arm/mach-socfpga/headsmp.S b/arch/arm/mach-socfpga/headsmp.S
> index 17d6eaf..9031a3c 100644
> --- a/arch/arm/mach-socfpga/headsmp.S
> +++ b/arch/arm/mach-socfpga/headsmp.S
> @@ -15,8 +15,10 @@
>  #define CPU1_START_ADDR 	        0xffd08010
>  
>  ENTRY(secondary_trampoline)
> +#if __LINUX_ARM_ARCH__ >= 7
>  	movw	r0, #:lower16:CPU1_START_ADDR
>  	movt  r0, #:upper16:CPU1_START_ADDR
> +#endif

If you do that, then it effectively means you don't need these instructions
and you might as well just delete them... but looking at the following one:

>  	ldr	r1, [r0]

it's clear that you do need it.  So you need to find a different solution.
If the above assembly file can only run on ARMv7, consider putting

	.march	armv7

or similar before it.
diff mbox

Patch

diff --git a/arch/arm/mach-socfpga/headsmp.S b/arch/arm/mach-socfpga/headsmp.S
index 17d6eaf..9031a3c 100644
--- a/arch/arm/mach-socfpga/headsmp.S
+++ b/arch/arm/mach-socfpga/headsmp.S
@@ -15,8 +15,10 @@ 
 #define CPU1_START_ADDR 	        0xffd08010
 
 ENTRY(secondary_trampoline)
+#if __LINUX_ARM_ARCH__ >= 7
 	movw	r0, #:lower16:CPU1_START_ADDR
 	movt  r0, #:upper16:CPU1_START_ADDR
+#endif
 
 	ldr	r1, [r0]
 	bx	r1