* [PATCH] arm: socfpga: fix build break for allyesconfig
@ 2012-10-26 22:17 dinguyen at altera.com
2012-10-26 21:26 ` Arnd Bergmann
2012-10-26 21:51 ` Russell King - ARM Linux
0 siblings, 2 replies; 8+ messages in thread
From: dinguyen at altera.com @ 2012-10-26 22:17 UTC (permalink / raw)
To: linux-arm-kernel
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
ldr r1, [r0]
bx r1
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH] arm: socfpga: fix build break for allyesconfig
2012-10-26 22:17 [PATCH] arm: socfpga: fix build break for allyesconfig dinguyen at altera.com
@ 2012-10-26 21:26 ` Arnd Bergmann
2012-10-26 21:51 ` Russell King - ARM Linux
1 sibling, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2012-10-26 21:26 UTC (permalink / raw)
To: linux-arm-kernel
On Friday 26 October 2012, dinguyen at 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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] arm: socfpga: fix build break for allyesconfig
2012-10-26 22:17 [PATCH] arm: socfpga: fix build break for allyesconfig dinguyen at altera.com
2012-10-26 21:26 ` Arnd Bergmann
@ 2012-10-26 21:51 ` Russell King - ARM Linux
2012-10-26 22:36 ` Pavel Machek
1 sibling, 1 reply; 8+ messages in thread
From: Russell King - ARM Linux @ 2012-10-26 21:51 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Oct 26, 2012 at 04:17:41PM -0600, dinguyen at 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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] arm: socfpga: fix build break for allyesconfig
2012-10-26 21:51 ` Russell King - ARM Linux
@ 2012-10-26 22:36 ` Pavel Machek
2012-10-26 22:43 ` Russell King - ARM Linux
0 siblings, 1 reply; 8+ messages in thread
From: Pavel Machek @ 2012-10-26 22:36 UTC (permalink / raw)
To: linux-arm-kernel
Hi!
> > 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.
My version of gas does not seem to recognize .march
( AS arch/arm/mach-socfpga/headsmp.o
arch/arm/mach-socfpga/headsmp.S: Assembler messages:
arch/arm/mach-socfpga/headsmp.S:17: Error: unknown pseudo-op: `.march'
arch/arm/mach-socfpga/headsmp.S:24: Error: selected processor does not
support `movw r0,#:lower16:(0xffd08000+0x10)'
arch/arm/mach-socfpga/headsmp.S:25: Error: selected processor does not
support `movt r0,#:upper16:(0xffd08000+0x10)'
)
This seems to do the trick:
Fix compilation with CPU_V6 option.
Signed-off-by: Pavel Machek <pavel@denx.de>
diff --git a/arch/arm/mach-socfpga/Makefile b/arch/arm/mach-socfpga/Makefile
index a0fc372..6956e93 100644
--- a/arch/arm/mach-socfpga/Makefile
+++ b/arch/arm/mach-socfpga/Makefile
@@ -4,3 +4,5 @@
obj-y := socfpga.o
obj-$(CONFIG_SMP) += headsmp.o platsmp.o hotplug.o
+
+AFLAGS_headsmp.o := -Wa,-march=armv7-a
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH] arm: socfpga: fix build break for allyesconfig
2012-10-26 22:36 ` Pavel Machek
@ 2012-10-26 22:43 ` Russell King - ARM Linux
2012-10-26 23:00 ` Pavel Machek
0 siblings, 1 reply; 8+ messages in thread
From: Russell King - ARM Linux @ 2012-10-26 22:43 UTC (permalink / raw)
To: linux-arm-kernel
On Sat, Oct 27, 2012 at 12:36:54AM +0200, Pavel Machek wrote:
> Hi!
>
> > > 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.
>
> My version of gas does not seem to recognize .march
Ah, that's because it's .arch not .march. Please could you check with
.arch instead. If proven successful we should move the existing
AFLAGS_xxx.o Makefile stuff into the assembly files concerned.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] arm: socfpga: fix build break for allyesconfig
2012-10-26 22:43 ` Russell King - ARM Linux
@ 2012-10-26 23:00 ` Pavel Machek
2012-10-27 10:43 ` Arnd Bergmann
0 siblings, 1 reply; 8+ messages in thread
From: Pavel Machek @ 2012-10-26 23:00 UTC (permalink / raw)
To: linux-arm-kernel
Hi!
> > > If the above assembly file can only run on ARMv7, consider putting
> > >
> > > .march armv7
> > >
> > > or similar before it.
> >
> > My version of gas does not seem to recognize .march
>
> Ah, that's because it's .arch not .march. Please could you check with
> .arch instead. If proven successful we should move the existing
> AFLAGS_xxx.o Makefile stuff into the assembly files concerned.
.arch armv7
results in
arch/arm/mach-socfpga/headsmp.S:21: Error: attempt to use an ARM
instruction on a Thumb-only processor -- `movw
r0,#:lower16:(0xffd08000+0x10)'
...
Using .arch armv7-a indeed works and is a very nice solution.
Signed-off-by: Pavel Machek <pavel@denx.de>
--- a/arch/arm/mach-socfpga/headsmp.S
+++ b/arch/arm/mach-socfpga/headsmp.S
@@ -11,6 +11,7 @@
#include <linux/init.h>
__INIT
+ .arch armv7-a
#define HPS_SYSMGR_ADDRESS 0xffd08000
#define CONFIG_SYSTEM_MANAGER HPS_SYSMGR_ADDRESS
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH] arm: socfpga: fix build break for allyesconfig
2012-10-26 23:00 ` Pavel Machek
@ 2012-10-27 10:43 ` Arnd Bergmann
2012-10-27 11:24 ` Pavel Machek
0 siblings, 1 reply; 8+ messages in thread
From: Arnd Bergmann @ 2012-10-27 10:43 UTC (permalink / raw)
To: linux-arm-kernel
On Friday 26 October 2012, Pavel Machek wrote:
> arch/arm/mach-socfpga/headsmp.S:21: Error: attempt to use an ARM
> instruction on a Thumb-only processor -- `movw
> r0,#:lower16:(0xffd08000+0x10)'
> ...
>
> Using .arch armv7-a indeed works and is a very nice solution.
>
> Signed-off-by: Pavel Machek <pavel@denx.de>
>
> --- a/arch/arm/mach-socfpga/headsmp.S
> +++ b/arch/arm/mach-socfpga/headsmp.S
> @@ -11,6 +11,7 @@
> #include <linux/init.h>
>
> __INIT
> + .arch armv7-a
>
> #define HPS_SYSMGR_ADDRESS 0xffd08000
> #define CONFIG_SYSTEM_MANAGER HPS_SYSMGR_ADDRESS
>
Thanks, applied with new commit message.
Arnd
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-10-27 11:24 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-26 22:17 [PATCH] arm: socfpga: fix build break for allyesconfig dinguyen at altera.com
2012-10-26 21:26 ` Arnd Bergmann
2012-10-26 21:51 ` Russell King - ARM Linux
2012-10-26 22:36 ` Pavel Machek
2012-10-26 22:43 ` Russell King - ARM Linux
2012-10-26 23:00 ` Pavel Machek
2012-10-27 10:43 ` Arnd Bergmann
2012-10-27 11:24 ` Pavel Machek
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).