[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CA+icZUV5r0RHffEX+tt6kj9g97_TY5FeB=Xc_5Tat2hZtdHXsQ@mail.gmail.com>
Date: Fri, 4 Jan 2019 10:56:23 +0100
From: Sedat Dilek <sedat.dilek@...il.com>
To: Masahiro Yamada <yamada.masahiro@...ionext.com>
Cc: Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
Ard Biesheuvel <ard.biesheuvel@...aro.org>,
Peter Zijlstra <peterz@...radead.org>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Will Deacon <will.deacon@....com>,
"David S . Miller" <davem@...emloft.net>,
Max Filippov <jcmvbkbc@...il.com>,
linux-arch <linux-arch@...r.kernel.org>,
linux-xtensa@...ux-xtensa.org,
linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
linuxppc-dev <linuxppc-dev@...ts.ozlabs.org>,
X86 ML <x86@...nel.org>,
linux-s390 <linux-s390@...r.kernel.org>,
sparclinux <sparclinux@...r.kernel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: jump_label: move 'asm goto' support test to Kconfig
On Thu, Jan 3, 2019 at 1:36 AM Masahiro Yamada
<yamada.masahiro@...ionext.com> wrote:
>
> On Wed, Jan 2, 2019 at 9:14 PM Sedat Dilek <sedat.dilek@...il.com> wrote:
> >
> > Hi,
> >
> > I was not aware that CONFIG_JUMP_LABEL Kconfig setting depends on the
> > support of asm-goto.
> >
> > Currently, I am doing experiments with clang-7 and a snapshot of
> > clang-8 on Linux/x86.
> > These compilers have no asm-goto support.
> >
> > What is your recommendation for Linux >= v4.20?
> > I am asking as it is possible to set CONFIG_JUMP_LABEL=y when
> > compiling with clang - which has no effect.
> > This is confusing.
> >
> > Thanks, this patch makes things clearer and protects users from
> > setting "wrong" in the sense of non-functional settings.
> >
> > I have tested this against recent Linus tree where kbuild/kconfig Git
> > pulls were latest commits.
> >
> > Tested-by: Sedat Dilek <sedat.dilek@...il.com> [ x86 with LLVM/Clang
> > v7 and v8 (snapshot) ]
>
>
> Which part was tested?
>
> x86 kernel cannot be compiled with Clang
> since it lacks the asm-goto support.
>
>
> $ make CC=clang
> Compiler lacks asm-goto support.
> arch/x86/Makefile:293: recipe for target 'checkbin' failed
> make: *** [checkbin] Error 1
>
Yes, this needs a workaround (see attachment).
As a base I took kbuid.git#for-next on top of Linux v4.20...
$ git log --oneline -2
58609f06cfb6 (HEAD -> 4.20.0-2-amd64-cbl) x86: Workaround clang does
not support asm-goto
68af7c873957 (for-4.20/kbuild-next-20190103) kbuild: remove
unnecessary stubs for archheader and archscripts
...and includes:
f44251005047 jump_label: move 'asm goto' support test to Kconfig
My compiler is clang-7 from Debian/testing.
$ git log --oneline -2
58609f06cfb6 (HEAD -> 4.20.0-2-amd64-cbl) x86: Workaround clang does
not support asm-goto
68af7c873957 (for-4.20/kbuild-next-20190103) kbuild: remove
unnecessary stubs for archheader and archscripts
It's compile-tested only on Debian/testing AMD64.
I cannot boot into bare metal.
This might have other root causes.
- Sedat -
P.S.: Additional informations
Booting in QEMU 3.1 shows...
$ ./run_qemu.sh
Probing EDD (edd=off to disable)... ok
XZ-compressed data is corrupt
-- System haltedqemu-system-x86_64: terminating on signal 2
$ cat run_qemu.sh
KPATH=$(pwd)
qemu-system-x86_64 -enable-kvm -M pc -kernel $KPATH/bzImage -initrd
$KPATH/initrd.img -m 512 -net none -serial stdio -append
"root=/dev/ram0 console=ttyS0 hung_task_panic=1
earlyprintk=ttyS0,115200"
NOTE: I can boot a Linux v4.20 kernel with this QEMU version.
View attachment "0001-x86-Workaround-clang-does-not-support-asm-goto.patch" of type "text/x-patch" (3300 bytes)
Download attachment "config-4.20.0-2-amd64-cbl" of type "application/octet-stream" (207628 bytes)
Powered by blists - more mailing lists