Hi Michal,

On 4/28/21 2:11 PM, Michal Simek wrote:
Hi,

On 4/28/21 2:41 AM, quanyang.wang wrote:
Hi Michal,

On 4/27/21 9:12 PM, Michal Simek wrote:
Hi,

On 4/23/21 6:26 AM, quanyang.w...@windriver.com wrote:
From: Quanyang Wang <quanyang.w...@windriver.com>

When CONFIG_CPU_32v6 is enabled and arm gcc isn't configured with the
option "--with-arch=armv7-a", there will be a build error message as
below:

arch/arm/mach-zynq/suspend.S:68: Error: selected processor does not support 
`dsb sy' in ARM mode
arch/arm/mach-zynq/headsmp.S:13: Error: selected processor does not support 
`setend be' in ARM mode

This is because in arch/arm/Makefile, arch-$(CONFIG_CPU_32v6) will
override arch-$(CONFIG_CPU_32v7), and if the arm gcc doesn't contain
"--with-arch=armv7-a" feature, gcc can only handle armv6 instructions and
armv7 instructions in suspend.S and headsmp.S can't be recognized.

Let's add "-march=armv7-a" to AFLAGS explicitly to avoid this build
error.

Reported-by: kernel test robot <l...@intel.com>
Signed-off-by: Quanyang Wang <quanyang.w...@windriver.com>
---
  arch/arm/mach-zynq/Makefile | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/arch/arm/mach-zynq/Makefile b/arch/arm/mach-zynq/Makefile
index dbb75be53deb..9b3e6a4140a2 100644
--- a/arch/arm/mach-zynq/Makefile
+++ b/arch/arm/mach-zynq/Makefile
@@ -10,3 +10,5 @@ obj-$(CONFIG_SMP)             += headsmp.o platsmp.o
  ORIG_AFLAGS := $(KBUILD_AFLAGS)
  KBUILD_AFLAGS = $(subst -march=armv6k,,$(ORIG_AFLAGS))
  obj-$(CONFIG_SUSPEND)         += suspend.o
+AFLAGS_suspend.o       +=-Wa,-march=armv7-a
+AFLAGS_headsmp.o       +=-Wa,-march=armv7-a

Acked-by: Michal Simek <michal.si...@xilinx.com>

Can you please also send it to upstream that I will take it via my tree?
Do you mean mainline or git-...@xilinx.com?
upstream - linux-arm-kernel <linux-arm-ker...@lists.infradead.org> and lkml.

In mainline kernel, there is no suspend.S. Do you mean I delete the part about suspend.S and send it

to linux-arm-kernel and lkml?

Thanks,
Quanyang


Thanks,
Michal




-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9823): 
https://lists.yoctoproject.org/g/linux-yocto/message/9823
Mute This Topic: https://lists.yoctoproject.org/mt/82303755/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to