* Re: [PATCH] x86/cpufeature: guard asm_volatile_goto usage with CC_HAVE_ASM_GOTO [not found] ` <20180413181924.GT4064@hirez.programming.kicks-ass.net> @ 2018-04-13 20:42 ` Alexei Starovoitov 2018-04-14 10:11 ` Peter Zijlstra 0 siblings, 1 reply; 3+ messages in thread From: Alexei Starovoitov @ 2018-04-13 20:42 UTC (permalink / raw) To: Peter Zijlstra Cc: Yonghong Song, mingo, daniel, linux-kernel, x86, kernel-team, Thomas Gleixner, netdev, Jesper Dangaard Brouer 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. ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] x86/cpufeature: guard asm_volatile_goto usage with CC_HAVE_ASM_GOTO 2018-04-13 20:42 ` [PATCH] x86/cpufeature: guard asm_volatile_goto usage with CC_HAVE_ASM_GOTO Alexei Starovoitov @ 2018-04-14 10:11 ` Peter Zijlstra 2018-04-14 20:30 ` Yonghong Song 0 siblings, 1 reply; 3+ messages in thread From: Peter Zijlstra @ 2018-04-14 10:11 UTC (permalink / raw) To: Alexei Starovoitov Cc: Yonghong Song, mingo, daniel, linux-kernel, x86, kernel-team, Thomas Gleixner, netdev, Jesper Dangaard Brouer On Fri, Apr 13, 2018 at 01:42:14PM -0700, Alexei Starovoitov wrote: > 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. The thing is; this will be a (temporary) BPF specific hack. Hiding it behind something that looks 'normal' (CC_HAVE_ASM_GOTO) is just not right. ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] x86/cpufeature: guard asm_volatile_goto usage with CC_HAVE_ASM_GOTO 2018-04-14 10:11 ` Peter Zijlstra @ 2018-04-14 20:30 ` Yonghong Song 0 siblings, 0 replies; 3+ messages in thread From: Yonghong Song @ 2018-04-14 20:30 UTC (permalink / raw) To: Peter Zijlstra, Alexei Starovoitov Cc: mingo, daniel, linux-kernel, x86, kernel-team, Thomas Gleixner, netdev, Jesper Dangaard Brouer On 4/14/18 3:11 AM, Peter Zijlstra wrote: > On Fri, Apr 13, 2018 at 01:42:14PM -0700, Alexei Starovoitov wrote: >> 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. > > The thing is; this will be a (temporary) BPF specific hack. Hiding it > behind something that looks 'normal' (CC_HAVE_ASM_GOTO) is just not > right. This is a fair concern. I will use a different macro and send v2 soon. Thanks. ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-04-14 20:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20180410204259.3981586-1-yhs@fb.com>
[not found] ` <20180410210716.GI4082@hirez.programming.kicks-ass.net>
[not found] ` <552d5866-912e-afde-f25a-77ae8390816d@fb.com>
[not found] ` <20180413181924.GT4064@hirez.programming.kicks-ass.net>
2018-04-13 20:42 ` [PATCH] x86/cpufeature: guard asm_volatile_goto usage with CC_HAVE_ASM_GOTO Alexei Starovoitov
2018-04-14 10:11 ` Peter Zijlstra
2018-04-14 20:30 ` Yonghong Song
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox