Received: by 10.192.165.148 with SMTP id m20csp421930imm; Fri, 20 Apr 2018 01:21:02 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+TDiCDM4Y+22ZNkx+mkOjB8ziNZw5g0GWNr6Lj9GIULdaGwLQIFEpqWCrVTgYkEXCdUNEo X-Received: by 10.99.67.65 with SMTP id q62mr7956387pga.358.1524212462430; Fri, 20 Apr 2018 01:21:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524212462; cv=none; d=google.com; s=arc-20160816; b=L8K0wKNi2IVLsnCdZy4riaJiKDz2iRCwCg8e1OxryKFvZR/XkH0dgbO2OxDf4iZMwE GCMS8dOkr7bso8XJS6SP5QBdtF2TtYv+FMxj54sz+U6mpJ1aR7VU6T30PgrGSO4v5EKg t2A1pIJ4qw8yOHxfr+yMcuWNTbiYdYq6wTKM29dM/NP0EuPgMVUk3lcs3VMf9ycfTmTR MuWLxF6wXHefW9L5CvyMIaBeF+0xD6UYmnqBs7olh+g/j7U1S1cvupxWNv5ZsEJFHOcT 1lAaRxfN4KRKA42edyYpXdT9aRKwFjohBAoYRrE8ajYdvHP5PDKHqNRxW1CSnfrIbLZ1 dgWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=QK2Cpqp+gx4AB0Xan/fkssTmFiKoLQYlReeDUI1RsaU=; b=ocv8aTNgnXBsTNdgxoxnrfgQ3JxHHvW4hkX8NEWWJp6OJ/2X42zOyRpUJ1kStC2VTP 15nn5W8HMOW2jY9rVPVqxUnNm8WSaN5ZC8Ojdv2gKbcHNCgCbFgqsvPDiKDNYVtYNeMf sJJkKN2HGTTySYgnLjKAsr8Me+Au565pWOtOhTjdLl71BBtePsTEkohUayc3fpkmzcae ZfhSgVbKRgbKYQ2TaUjjwjrYvlLQPOSr1D7s8dDTEdzZRCaPE5lQP9oGghXps8jbOcqV DrIakyxUpO0CGfNGJJt9+hI4RgE/FHVq7lh3zQoXX2jBj1vLBrRjtSHu3HsqKNYJqr6o 6GOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=f5A+oEQu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v4si2001742pgn.260.2018.04.20.01.20.47; Fri, 20 Apr 2018 01:21:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=f5A+oEQu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753956AbeDTITp (ORCPT + 99 others); Fri, 20 Apr 2018 04:19:45 -0400 Received: from merlin.infradead.org ([205.233.59.134]:46900 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753905AbeDTITn (ORCPT ); Fri, 20 Apr 2018 04:19:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=QK2Cpqp+gx4AB0Xan/fkssTmFiKoLQYlReeDUI1RsaU=; b=f5A+oEQuUpdnbaBHG8ihMyifd n1xoVaBOcZb5PPIyAekMGWSNFs45btCflY3zCy4Dk85RHJpkj8bF1dmvPucjUdFvTLxoilU38dcVo DJzaN6M8MPVu7gfX1o1Jb4YXQXY4nsLxX5Wd0FrsycY2Zm7UgBym2GoAIsmC9D1tV+LXT1Z1Xt0eh XGf8L8mnEOt7vupZMhvCGt669YSSI7e3/fEcz0Ae0Q+6sL7+L6R/+m0DEuQsMUVq+nOs+6Xg2VmGh LsnJZJFracCtSKBwmId4EspwUvtGI5f0nzwi+4qQ6uaB8b7KWyWnwNOcdGvbDweGxK4tJQFh3bjqH lXxEtGi8A==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1f9RGc-0001vV-JL; Fri, 20 Apr 2018 08:19:38 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 1181A20297ECE; Fri, 20 Apr 2018 10:19:36 +0200 (CEST) Date: Fri, 20 Apr 2018 10:19:36 +0200 From: Peter Zijlstra To: Yonghong Song Cc: mingo@kernel.org, ast@fb.com, daniel@iogearbox.net, linux-kernel@vger.kernel.org, x86@kernel.org, kernel-team@fb.com Subject: Re: [PATCH v2] x86/cpufeature: guard asm_volatile_goto usage with NO_BPF_WORKAROUND Message-ID: <20180420081936.GD4064@hirez.programming.kicks-ass.net> References: <20180415042738.1788215-1-yhs@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180415042738.1788215-1-yhs@fb.com> User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Apr 14, 2018 at 09:27:38PM -0700, Yonghong Song wrote: > This patch adds a preprocessor guard NO_BPF_WORKAROUND around the > asm_volatile_goto based static_cpu_has(). NO_BPF_WORKAROUND is set > at toplevel Makefile when compiler supports asm-goto. That is, > if the compiler supports asm-goto, the kernel build will use > asm-goto version of static_cpu_has(). Hurm, so adding __BPF__ for BPF compiles isn't an option? It seems to me having a CPP flag to identify BPF compile context might be useful in general.