Hi Michal,
On 4/28/21 10:00 PM, Michal Simek wrote:
On 4/28/21 3:44 PM, quanyang.wang wrote:
Hi Michal,
On 4/28/21 9:09 PM, Michal Simek wrote:
Hi,
On 4/28/21 11:24 AM, quanyang.wang wrote:
Hi Michal,
On 4/28/21 2:26 PM, Michal Simek wrote:
Hi,
On 4/28/21 8:19 AM, quanyang.wang wrote:
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?
ah yeah. I remember Soren was trying to push it there in past.
Yes - just target that one file for upstreaming.
I tested on mainline kernel just now and found that mainline has no this
issue.
I wrote the wrong reason in the commit message. The root cause is that
xilinx
SDK delete "-march=armv6k" from KBUILD_AFLAGS in
arch/arm/mach-zynq/Makefile:
ORIG_AFLAGS := $(KBUILD_AFLAGS)
KBUILD_AFLAGS = $(subst -march=armv6k,,$(ORIG_AFLAGS))
When CONFIG_CPU_32v6 and CONFIG_CPU_32v7 are both enabled,
CONFIG_CPU_32v6K
will be seleted, and "-march=armv6k" will be added to AFLAGS.
So upstream kernel can build headsmp.S well with "-march=armv6k". But
linux-yocto build
failed without "-march=xxx" because there is armv6 instructions in
headsmp.S and armv7
instructions in suspend.S. So this patch is only avaible for linux-yocto
and linux-xlnx.
And I wonder if this patch is the best solution since I can't figure out
the reason that delete
"-march=armv6k".
Michal, would you please give me some suggestions?
First of all I don't think we should keep any patch which we know that
can't go upstream in xilinx repo.
Mark: Can you please take a look at it why this is happening in yocto?
Sorry, I didn't explain this clear. This issue is introduced by the
commit as below:
https://github.com/Xilinx/linux-xlnx/commit/a32e73f42fc702335fee6a5e2a499ea696f5f9b8#diff-b150a32f20652a3ecec354a09860f088340613fa8aa9642c4f40e01573bc338d
Since this commit isn't in mainline kernel, so mainline don't have this
issue.
Only linux-yocto and linux-xlnx need it since they both contain it.
What I mean here is that if we just delete the lines as below is a
better solution?
ORIG_AFLAGS := $(KBUILD_AFLAGS)
KBUILD_AFLAGS = $(subst -march=armv6k,,$(ORIG_AFLAGS))
That's sounds better to me.
Got it. I will send a patch to delete them.
Thanks,
Quanyang
Thanks,
Michal
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9832):
https://lists.yoctoproject.org/g/linux-yocto/message/9832
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]
-=-=-=-=-=-=-=-=-=-=-=-