Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3029798pxb; Fri, 12 Feb 2021 07:32:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJzavX4sMqbyvwhlaT++Hv+abRVATDZW9JIsPhk5DWpqOXVAlKahkzBS8CyapyLzzeyjzGI3 X-Received: by 2002:a17:907:7295:: with SMTP id dt21mr3645683ejc.518.1613143934276; Fri, 12 Feb 2021 07:32:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613143934; cv=none; d=google.com; s=arc-20160816; b=gYAa9+KnA2oMDpyC5ldQ95uaDVUNgROwWsycAg2oiN5RdoTgy5oEbqkTDf6QfQGKJx eLxWwY9YEU98wYyDeZDVuThWVotV6SZa4Jqny8XJnmhGNJN2kjIOLed1nRmnWBe7kQzS eMHp+Tns73zx7rZNX0PKKILc8YtH0VZ6gOUvctVPjm2P2Eg825iiz/sPuXqFgaAM7mpC r7EnF9NWV34XU/auDagtRkVg7+Lt3mEEN0SLHGciA8qnz0CqfH8X06ZiflaRPqvJykfk Y9Fk6SmTEIWYMiEMPcLkqkrxKsoA9myCfEry8wNl83v4TwV7FTh5GCo871oqcVrMKfne drxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=xCWTsoSbOlREB9C8JV0M5wM8KtNFMw7ytG5hkc4u4As=; b=faU+Bwe+4T4+fh5HfXGXMgglBNFr+fysyhLstQdoHeCGVjusuT/RLekRXPzcqR5C6+ gWgrNMjv+aBdQC+uFmdpSJpBDfRiAI+1ZerMkTjVJnFjUeqdkme6VypX+AvXD+pYAE9u KPebP+aLxf7WKnWrtlZ3uRl/luwCyfGqvUWGeENo0TpXeb25pWkS6yFO0HcaUviMLIpe GhSaOJz4ZR+e4bJ2EhSNDuxcIvTzqQFAAm1unnyDzaQhvCwyd0QY8tO6SBIh/CLF+Xy/ F3e+HDGk8FQNK7WHZNrNgLLdUE1Q8BP0nu/XsASC1ZagtipP+f+Yu2noQQQaFhaxcxYo d3Vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=02pPfDfD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j23si6689155eje.347.2021.02.12.07.31.50; Fri, 12 Feb 2021 07:32:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=02pPfDfD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230521AbhBLP2v (ORCPT + 99 others); Fri, 12 Feb 2021 10:28:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231754AbhBLP2f (ORCPT ); Fri, 12 Feb 2021 10:28:35 -0500 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB828C061574 for ; Fri, 12 Feb 2021 07:27:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=xCWTsoSbOlREB9C8JV0M5wM8KtNFMw7ytG5hkc4u4As=; b=02pPfDfDq2DgQpcKDDFXi7krtc noEa1zoBRz51wPIHSZ76k30UlPMtHuXcszIn+eSqXHMnyegDDpbC+wEMhu4/fD3QYK4MKW7NMjU/t mCTLehrbsKo3rChovH0+ll3z5JP5tRCtm6Q0SV7lGjhGyVHaJcOcPUiJTn+04ZHqLaGYzlNVV0suQ V1OiUz+9T5IxEX+N7DX3nPPlAjXJM74T4L1wL3Ke3pO3TmC0Dz6O3btXmWwGqb4GZgxg8lT4kQCtr yYP8MStjDmDMvfyTdLJC8b3Nzhk+Inu/EQAiNmh7g3F+RKa3xFtj4A3La45ZK7YRUZr1UjoCyjwo+ AW/pmvWA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1lAaMD-00031t-SC; Fri, 12 Feb 2021 15:27:46 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 7C1B3300446; Fri, 12 Feb 2021 16:27:42 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 521542C1CD09A; Fri, 12 Feb 2021 16:27:42 +0100 (CET) Date: Fri, 12 Feb 2021 16:27:42 +0100 From: Peter Zijlstra To: Steven Rostedt Cc: Jason Gerecke , linux-kernel@vger.kernel.org, Josh Poimboeuf , Jason Baron , Jason Gerecke , Ard Biesheuvel , "x86@kernel.org" Subject: Re: [PATCH] RFC: x86/jump_label: Mark arguments as const to satisfy asm constraints Message-ID: References: <20210211214848.536626-1-jason.gerecke@wacom.com> <20210212094059.5f8d05e8@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210212094059.5f8d05e8@gandalf.local.home> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 12, 2021 at 09:40:59AM -0500, Steven Rostedt wrote: > On Thu, 11 Feb 2021 13:48:48 -0800 > Jason Gerecke wrote: > > > When compiling an external kernel module with `-O0` or `-O1`, the following > > compile error may be reported: > > > > ./arch/x86/include/asm/jump_label.h:25:2: error: impossible constraint in ‘asm’ > > 25 | asm_volatile_goto("1:" > > | ^~~~~~~~~~~~~~~~~ > > > > It appears that these lower optimization levels prevent GCC from detecting > > that the key/branch arguments can be treated as constants and used as > > immediate operands. To work around this, explicitly add the `const` label. > > Yes this makes sense. The "i" constraint needs to be a constant. Right, using -O[01] seems a little daft though. But yeah, that patch is correct and won't cause harm. I've queued it for after the next merge window.