linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [next] arm64: efi-rt-wrapper.S:8: Error: unknown mnemonic `bti' -- `bti c'
@ 2021-12-16  4:00 Naresh Kamboju
  2021-12-17 14:00 ` Catalin Marinas
  0 siblings, 1 reply; 6+ messages in thread
From: Naresh Kamboju @ 2021-12-16  4:00 UTC (permalink / raw)
  To: Linux ARM, open list, Linux-Next Mailing List
  Cc: Catalin Marinas, Will Deacon, Arnd Bergmann, Stephen Rothwell,
	Mark Brown

[ Please ignore this email if it is already reported ]

While building Linux next 20211215 arm64 defconfig with gcc-8
following warnings / errors noticed.
and gcc-9, gcc-10 and gcc-11 builds pass.

make --silent --keep-going --jobs=8
O=/home/tuxbuild/.cache/tuxmake/builds/current \
  ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- \
  CROSS_COMPILE_COMPAT=arm-linux-gnueabihf- \
  'CC=sccache aarch64-linux-gnu-gcc' \
  'HOSTCC=sccache gcc'

/builds/linux/arch/arm64/kernel/efi-rt-wrapper.S: Assembler messages:
/builds/linux/arch/arm64/kernel/efi-rt-wrapper.S:8: Error: unknown
mnemonic `bti' -- `bti c'
make[3]: *** [/builds/linux/scripts/Makefile.build:411:
arch/arm64/kernel/efi-rt-wrapper.o] Error 1


meta data:
-----------
    git describe: next-20211215
    git_repo: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
    git_sha: 93bf6eee76c0e716f6b32de690b1c52991547bb4
    git_short_log: 93bf6eee76c0 (\"Add linux-next specific files for 20211215\")
    target_arch: arm64
    toolchain: gcc-8

steps to reproduce:
# To install tuxmake on your system globally:
# sudo pip3 install -U tuxmake

tuxmake --runtime podman --target-arch arm64 --toolchain gcc-8
--kconfig defconfig

Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>

build log:
https://builds.tuxbuild.com/22LCvXNzzZHquxsEYJUxEGe1kHW/

--
Linaro LKFT
https://lkft.linaro.org

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

* Re: [next] arm64: efi-rt-wrapper.S:8: Error: unknown mnemonic `bti' -- `bti c'
  2021-12-16  4:00 [next] arm64: efi-rt-wrapper.S:8: Error: unknown mnemonic `bti' -- `bti c' Naresh Kamboju
@ 2021-12-17 14:00 ` Catalin Marinas
  2021-12-17 14:49   ` Mark Brown
  0 siblings, 1 reply; 6+ messages in thread
From: Catalin Marinas @ 2021-12-17 14:00 UTC (permalink / raw)
  To: Naresh Kamboju
  Cc: Linux ARM, open list, Linux-Next Mailing List, Will Deacon,
	Arnd Bergmann, Stephen Rothwell, Mark Brown

Thanks Naresh for the report.

On Thu, Dec 16, 2021 at 09:30:44AM +0530, Naresh Kamboju wrote:
> [ Please ignore this email if it is already reported ]
> 
> While building Linux next 20211215 arm64 defconfig with gcc-8
> following warnings / errors noticed.
> and gcc-9, gcc-10 and gcc-11 builds pass.
> 
> make --silent --keep-going --jobs=8
> O=/home/tuxbuild/.cache/tuxmake/builds/current \
>   ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- \
>   CROSS_COMPILE_COMPAT=arm-linux-gnueabihf- \
>   'CC=sccache aarch64-linux-gnu-gcc' \
>   'HOSTCC=sccache gcc'
> 
> /builds/linux/arch/arm64/kernel/efi-rt-wrapper.S: Assembler messages:
> /builds/linux/arch/arm64/kernel/efi-rt-wrapper.S:8: Error: unknown
> mnemonic `bti' -- `bti c'
> make[3]: *** [/builds/linux/scripts/Makefile.build:411:
> arch/arm64/kernel/efi-rt-wrapper.o] Error 1

We defined the bti macro in assembler.h but that's not included by
linkage.h and not all asm files seem to include the former. At a quick
grep we need the diff below, not sure it's the best solution:

diff --git a/arch/arm64/crypto/nh-neon-core.S b/arch/arm64/crypto/nh-neon-core.S
index 51c0a534ef87..bf6f7ee46d63 100644
--- a/arch/arm64/crypto/nh-neon-core.S
+++ b/arch/arm64/crypto/nh-neon-core.S
@@ -8,6 +8,7 @@
  */
 
 #include <linux/linkage.h>
+#include <asm/assembler.h>
 
 	KEY		.req	x0
 	MESSAGE		.req	x1
diff --git a/arch/arm64/kernel/efi-rt-wrapper.S b/arch/arm64/kernel/efi-rt-wrapper.S
index 75691a2641c1..9fde85521146 100644
--- a/arch/arm64/kernel/efi-rt-wrapper.S
+++ b/arch/arm64/kernel/efi-rt-wrapper.S
@@ -4,6 +4,7 @@
  */
 
 #include <linux/linkage.h>
+#include <asm/assembler.h>
 
 SYM_FUNC_START(__efi_rt_asm_wrapper)
 	stp	x29, x30, [sp, #-32]!
diff --git a/arch/arm64/kernel/reloc_test_syms.S b/arch/arm64/kernel/reloc_test_syms.S
index c50f45fa29fa..57bf78446a29 100644
--- a/arch/arm64/kernel/reloc_test_syms.S
+++ b/arch/arm64/kernel/reloc_test_syms.S
@@ -4,6 +4,7 @@
  */
 
 #include <linux/linkage.h>
+#include <asm/assembler.h>
 
 SYM_FUNC_START(absolute_data64)
 	ldr	x0, 0f

-- 
Catalin

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

* Re: [next] arm64: efi-rt-wrapper.S:8: Error: unknown mnemonic `bti' -- `bti c'
  2021-12-17 14:00 ` Catalin Marinas
@ 2021-12-17 14:49   ` Mark Brown
  2021-12-17 15:53     ` Catalin Marinas
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2021-12-17 14:49 UTC (permalink / raw)
  To: Catalin Marinas
  Cc: Naresh Kamboju, Linux ARM, open list, Linux-Next Mailing List,
	Will Deacon, Arnd Bergmann, Stephen Rothwell

[-- Attachment #1: Type: text/plain, Size: 1032 bytes --]

On Fri, Dec 17, 2021 at 02:00:24PM +0000, Catalin Marinas wrote:
> On Thu, Dec 16, 2021 at 09:30:44AM +0530, Naresh Kamboju wrote:
> > [ Please ignore this email if it is already reported ]

It's probably not worth reporting -next issues to the -next maintainer
unless they're specifically in the -next merge - I'd not read this
report since it was part of a small batch of reports you'd sent at the
same time which appeared to be being sent to me because I was running
-next rather than them being directed at me.  It can result in things
that need attention getting missed.

> We defined the bti macro in assembler.h but that's not included by
> linkage.h and not all asm files seem to include the former. At a quick
> grep we need the diff below, not sure it's the best solution:

That seems sensible to me, especially given the small number of files
affected.  The other thing would be to decide that all assembly files
should have the header included by default but that seems like it's
invasive and probably disproportionate.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [next] arm64: efi-rt-wrapper.S:8: Error: unknown mnemonic `bti' -- `bti c'
  2021-12-17 14:49   ` Mark Brown
@ 2021-12-17 15:53     ` Catalin Marinas
  2021-12-17 16:12       ` Mark Brown
  0 siblings, 1 reply; 6+ messages in thread
From: Catalin Marinas @ 2021-12-17 15:53 UTC (permalink / raw)
  To: Mark Brown
  Cc: Naresh Kamboju, Linux ARM, open list, Linux-Next Mailing List,
	Will Deacon, Arnd Bergmann, Stephen Rothwell

On Fri, Dec 17, 2021 at 02:49:30PM +0000, Mark Brown wrote:
> On Fri, Dec 17, 2021 at 02:00:24PM +0000, Catalin Marinas wrote:
> > We defined the bti macro in assembler.h but that's not included by
> > linkage.h and not all asm files seem to include the former. At a quick
> > grep we need the diff below, not sure it's the best solution:
> 
> That seems sensible to me, especially given the small number of files
> affected.  The other thing would be to decide that all assembly files
> should have the header included by default but that seems like it's
> invasive and probably disproportionate.

There's also this:

diff --git a/arch/arm64/include/asm/linkage.h b/arch/arm64/include/asm/linkage.h
index 9065e4749b42..b77e9b3f5371 100644
--- a/arch/arm64/include/asm/linkage.h
+++ b/arch/arm64/include/asm/linkage.h
@@ -1,6 +1,10 @@
 #ifndef __ASM_LINKAGE_H
 #define __ASM_LINKAGE_H

+#ifdef __ASSEMBLY__
+#include <asm/assembler.h>
+#endif
+
 #define __ALIGN		.align 2
 #define __ALIGN_STR	".align 2"

-- 
Catalin

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

* Re: [next] arm64: efi-rt-wrapper.S:8: Error: unknown mnemonic `bti' -- `bti c'
  2021-12-17 15:53     ` Catalin Marinas
@ 2021-12-17 16:12       ` Mark Brown
  2021-12-17 16:18         ` Catalin Marinas
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2021-12-17 16:12 UTC (permalink / raw)
  To: Catalin Marinas
  Cc: Naresh Kamboju, Linux ARM, open list, Linux-Next Mailing List,
	Will Deacon, Arnd Bergmann, Stephen Rothwell

[-- Attachment #1: Type: text/plain, Size: 442 bytes --]

On Fri, Dec 17, 2021 at 03:53:13PM +0000, Catalin Marinas wrote:
> On Fri, Dec 17, 2021 at 02:49:30PM +0000, Mark Brown wrote:

> > That seems sensible to me, especially given the small number of files
> > affected.  The other thing would be to decide that all assembly files
> > should have the header included by default but that seems like it's
> > invasive and probably disproportionate.

> There's also this:

True, that's even simpler.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [next] arm64: efi-rt-wrapper.S:8: Error: unknown mnemonic `bti' -- `bti c'
  2021-12-17 16:12       ` Mark Brown
@ 2021-12-17 16:18         ` Catalin Marinas
  0 siblings, 0 replies; 6+ messages in thread
From: Catalin Marinas @ 2021-12-17 16:18 UTC (permalink / raw)
  To: Mark Brown
  Cc: Naresh Kamboju, Linux ARM, open list, Linux-Next Mailing List,
	Will Deacon, Arnd Bergmann, Stephen Rothwell

On Fri, Dec 17, 2021 at 04:12:00PM +0000, Mark Brown wrote:
> On Fri, Dec 17, 2021 at 03:53:13PM +0000, Catalin Marinas wrote:
> > On Fri, Dec 17, 2021 at 02:49:30PM +0000, Mark Brown wrote:
> 
> > > That seems sensible to me, especially given the small number of files
> > > affected.  The other thing would be to decide that all assembly files
> > > should have the header included by default but that seems like it's
> > > invasive and probably disproportionate.
> 
> > There's also this:
> 
> True, that's even simpler.

I'll fold this into your bti patch.

-- 
Catalin

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

end of thread, other threads:[~2021-12-17 16:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-16  4:00 [next] arm64: efi-rt-wrapper.S:8: Error: unknown mnemonic `bti' -- `bti c' Naresh Kamboju
2021-12-17 14:00 ` Catalin Marinas
2021-12-17 14:49   ` Mark Brown
2021-12-17 15:53     ` Catalin Marinas
2021-12-17 16:12       ` Mark Brown
2021-12-17 16:18         ` Catalin Marinas

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).