From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ADE44C282DD for ; Fri, 10 Jan 2020 15:45:53 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7DBDB20721 for ; Fri, 10 Jan 2020 15:45:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="p2E0HimT"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="Ob4HqYr6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7DBDB20721 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=IxzIZKd8s7TFe6FUMsOBCYvlaPAnPfBRUXiJ2F3VIEg=; b=p2E0HimTzB2Bc+ Bw+oBd2TWAcHY8OIeDsTWItbBbLycBvDQu0GHQ3BSDRwN2b+JUd9CI7mDQWrq/6R6ay30/Lt7aMyK xx0UqHRiMF9vaa0uN+sAgPEFyu66YgD2TequHVYla6gErnHIQb6Gg7FQBu1LTZcIPSxBIMEXrk42K H5CM/9vk1ULKQZnrk6JmHPec+F5I8oQ/Alt1Te/eeWi2ROp2CB4la+oRJ8IJqEfF4JDGP9BfgVv3b DDwmMdjXlZbWJLHfORB/6tYloQ8YudJGrwxqL33m/vrQ5CdiZIS3HSh77ZaAhm2YHk7mnfTIgE7AT /aZ/TDKPdlYp1Dy9F/gA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ipwTu-0004M6-H8; Fri, 10 Jan 2020 15:45:50 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ipwTr-0004LZ-Gj for linux-arm-kernel@lists.infradead.org; Fri, 10 Jan 2020 15:45:49 +0000 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8313A20721; Fri, 10 Jan 2020 15:45:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578671147; bh=90ahBolX25qUsAcxNDXTmKxnI5LtOfuRIIECghRrV+M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Ob4HqYr6iHPOSoqyWVIKJB4ru+VVfypOi9n0lEo1XXbmTWLxNdEX3UtOaY3HmW1Je Rx/qmFVhP4vxEl/NvRnROJDZ9SRHascbZ0tkqnCNmTWkFIQ597DyQbma3alX15tZ01 YeYclnoI3jXP6ElwlUttlwhTpLe3sjg2NWjZo1es= Date: Fri, 10 Jan 2020 15:45:43 +0000 From: Will Deacon To: Catalin Marinas Subject: Re: [PATCH 2/2] arm64: Move the LSE gas support detection to Kconfig Message-ID: <20200110154542.GB24322@willie-the-truck> References: <20200109174948.48211-1-catalin.marinas@arm.com> <20200109174948.48211-3-catalin.marinas@arm.com> <20200110120826.GC10066@willie-the-truck> <20200110153013.GH8786@arrakis.emea.arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200110153013.GH8786@arrakis.emea.arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200110_074547_595393_6993FB13 X-CRM114-Status: GOOD ( 21.78 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vladimir Murzin , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Jan 10, 2020 at 03:30:14PM +0000, Catalin Marinas wrote: > On Fri, Jan 10, 2020 at 12:08:26PM +0000, Will Deacon wrote: > > On Fri, Jan 10, 2020 at 11:54:38AM +0000, Vladimir Murzin wrote: > > > On 1/9/20 5:49 PM, Catalin Marinas wrote: > > > > diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c > > > > index 04cf64e9f0c9..2595c2886d3f 100644 > > > > --- a/arch/arm64/kernel/cpufeature.c > > > > +++ b/arch/arm64/kernel/cpufeature.c > > > > @@ -1291,7 +1291,7 @@ static const struct arm64_cpu_capabilities arm64_features[] = { > > > > .cpu_enable = cpu_enable_pan, > > > > }, > > > > #endif /* CONFIG_ARM64_PAN */ > > > > -#if defined(CONFIG_AS_LSE) && defined(CONFIG_ARM64_LSE_ATOMICS) > > > > +#ifdef CONFIG_ARM64_LSE_ATOMICS > > > > { > > > > .desc = "LSE atomic instructions", > > > > .capability = ARM64_HAS_LSE_ATOMICS, > > > > @@ -1302,7 +1302,7 @@ static const struct arm64_cpu_capabilities arm64_features[] = { > > > > .sign = FTR_UNSIGNED, > > > > .min_field_value = 2, > > > > }, > > > > -#endif /* CONFIG_AS_LSE && CONFIG_ARM64_LSE_ATOMICS */ > > > > +#endif /* CONFIG_ARM64_LSE_ATOMICS */ > > > > { > > > > .desc = "Software prefetching using PRFM", > > > > .capability = ARM64_HAS_NO_HW_PREFETCH, > > > > > > > > > > I was not lucky with the similar patch [1], anyway > > > > > > Reviewed-by: Vladimir Murzin > > > > > > > > > [1] https://www.spinics.net/lists/linux-crypto/msg36059.html > > > > It's the loss of the warning that I object to, since I think it's a useful > > diagnostic to have. Is there some way we can keep that, but using the new > > kbuild logic? > > With the kbuild logic, you can't select CONFIG_ARM64_LSE_ATOMICS because > CONFIG_AS_HAS_LSE is n (when gas doesn't support LSE). I consider this a > good indication to the user trying to enable it without the need for a > warning. > > The alternative is to let the user state their preference with a config > option without any dependencies: > > config ARM64_WANT_LSE_ATOMICS > bool "..." > depends on JUMP_LABEL > default y > > config ARM64_LSE_ATOMICS > def_bool CONFIG_ARM64_WANT_LSE_ATOMICS > depends on CONFIG_AS_HAS_LSE > > and in the Makefile, warn if CONFIG_ARM64_WANT_LSE_ATOMICS && > !CONFIG_ARM64_LSE_ATOMICS. > > You can even get the warning directly from kbuild if you select > ARM64_LSE_ATOMICS from ARM64_WANT_* (unmet dependency). > > I personally don't think it's worth the hassle. We don't warn if the > compiler doesn't support jump labels, why would we do this for LSE. The thing I dislike about it is that if somebody sends you a .config with LSE enabled, and your compiler doesn't support it, then it silently get disabled. There are two differences with jump labels: 1. Most compilers support jump labels 2. LSE atomics also depend on the CPU features before they get enabled at runtime. Mainly because of (2), I think silently disabling LSE at build time is really confusing when you're trying to figure out why it's not in use. Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel