[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a65f6542-8754-ea84-d1bf-076349b6b288@fb.com>
Date: Fri, 13 Apr 2018 13:42:14 -0700
From: Alexei Starovoitov <ast@...com>
To: Peter Zijlstra <peterz@...radead.org>
CC: Yonghong Song <yhs@...com>, <mingo@...nel.org>,
<daniel@...earbox.net>, <linux-kernel@...r.kernel.org>,
<x86@...nel.org>, <kernel-team@...com>,
Thomas Gleixner <tglx@...utronix.de>,
netdev <netdev@...r.kernel.org>,
Jesper Dangaard Brouer <brouer@...hat.com>
Subject: Re: [PATCH] x86/cpufeature: guard asm_volatile_goto usage with
CC_HAVE_ASM_GOTO
On 4/13/18 11:19 AM, Peter Zijlstra wrote:
> On Tue, Apr 10, 2018 at 02:28:04PM -0700, Alexei Starovoitov wrote:
>> Instead of
>> #ifdef CC_HAVE_ASM_GOTO
>> we can replace it with
>> #ifndef __BPF__
>> or some other name,
>
> I would prefer the BPF specific hack; otherwise we might be encouraging
> people to build the kernel proper without asm-goto.
>
I don't understand this concern.
1.
arch/x86/Makefile does
ifndef CC_HAVE_ASM_GOTO
$(error Compiler lacks asm-goto support.)
endif
which is pretty strong statement of the kernel direction.
2.
Even with this patch that adds #ifdef CC_HAVE_ASM_GOTO back
the x86 arch still needs asm-goto in the compiler to be built.
As far as I can see there are other places where asm-goto
is open coded.
So there is no 'encouraging'.
Whereas if we do bpf specific marco we'd need to explain that
to all bpf users and they would need to fix their user space scripts.
Amount of user space breakage is unknown at this point.
Powered by blists - more mailing lists