mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* arch/x86/entry/entry: RFC on recent kernels building error with llvm 11.0.2 internal assembler
@ 2022-04-29 17:40 Mauro Rossi
  2022-04-30 21:30 ` Nathan Chancellor
  0 siblings, 1 reply; 11+ messages in thread
From: Mauro Rossi @ 2022-04-29 17:40 UTC (permalink / raw)
  To: luto; +Cc: Chih-Wei Huang, Linux Kernel Mailing List

Hi Andy,

I am an hobbyist contributing to android-x86 FOSS project lead by
Chih-Huwei Huang (in Cc: for information/alignement)

I am performing periodic tests to build kernel for Android 11 based iso image
which relies on aosp shipped prebuild clang toolchain (clang version 11.0.2)

When building linux 5.18rc4 and also with linux 5.17 x86_64 64bit kernel targets
there is a building error in arch/x86/entry

  AS      arch/x86/entry/entry_64.o
<instantiation>:2:2: error: unknown use of instruction mnemonic
without a size suffix
 lsl %rax, %rax
 ^
<instantiation>:1:1: note: while in macro instantiation
LOAD_CPU_AND_NODE_SEG_LIMIT %rax
^
<instantiation>:2:2: note: while in macro instantiation
 GET_PERCPU_BASE %rax
 ^
/home/utente/r-x86_kernel/kernel/arch/x86/entry/entry_64.S:890:2:
note: while in macro instantiation
 SAVE_AND_SET_GSBASE scratch_reg=%rax save_reg=%rbx
 ^
make[3]: *** [/home/utente/r-x86_kernel/kernel/scripts/Makefile.build:389:
arch/x86/entry/entry_64.o] Error 1
make[2]: *** [/home/utente/r-x86_kernel/kernel/scripts/Makefile.build:550:
arch/x86/entry] Error 2
make[1]: *** [/home/utente/r-x86_kernel/kernel/Makefile:1887: arch/x86] Error 2
make[1]: *** Waiting for unfinished jobs....

As other interesting info, the building error does not happen when
building x86 32bit kernel target and i can build 86_64 64bit kernel
target only by setting the LLVM_IAS=0 parameter to disable the
internal llvm assembler

I wanted to ask you if you could help us, if there could be a way to
improve arch/x86/entry/entry_64.S code to be able to complete the
build without disabling the llvm internal assembler.

I don't know if this building error may be caused by the clang version
11.0.2, but at some point the aosp and android version may hit this
same issue,
so I wanted to highlight this issue to you to have a competent person feedback,
as I am more a "trial and error" guy than a kernel expert

Thanks in advance for any info

Mauro Rossi
android-x86 team

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

end of thread, other threads:[~2022-06-06 22:18 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-29 17:40 arch/x86/entry/entry: RFC on recent kernels building error with llvm 11.0.2 internal assembler Mauro Rossi
2022-04-30 21:30 ` Nathan Chancellor
2022-05-01 16:47   ` Mauro Rossi
2022-05-07 12:19     ` Mauro Rossi
2022-05-09  0:07       ` Nathan Chancellor
2022-05-29 18:46         ` Mauro Rossi
     [not found]         ` <CAEQFVGYSV=boBYGHfJLis8ayftzNPJy1UYgeEEQLuNb0hSfhjg@mail.gmail.com>
2022-05-31 22:08           ` Nick Desaulniers
2022-06-01 12:57             ` Mauro Rossi
2022-06-03 22:13               ` Nick Desaulniers
2022-06-06 21:57                 ` Mauro Rossi
2022-06-06 22:18                   ` Nick Desaulniers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®