Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1027119pxb; Thu, 4 Mar 2021 01:01:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJwO9EzOWctjGGjitvlny7XxS0v46ZbkArx+dzPcLInhFKiOjtOChL1PtpbITj639Apd4fNS X-Received: by 2002:a17:907:110c:: with SMTP id qu12mr3158790ejb.442.1614848490098; Thu, 04 Mar 2021 01:01:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614848490; cv=none; d=google.com; s=arc-20160816; b=TMecuqDo6yZ4nuram6G5fzabUD/v2b0lJYWfPCH+KC20dW42HzOYzK9J1OZNfD3/Aw fkFC6YGEWVbxF4vTP59Fss3Y0NOY4vdizyTFEZ44E0ofn3bBF9A7qzfnpVMI3MLHw3ld ucKhA0TFZin0qwqCOzHgcNkT+5P8J5H96rta1mDu5L2B2PpGjd5wVj2kWnkY0cNwVVxc J8iI9jrhq2P8AvM3iGHQhyVmlgqYx1056iBs8jQklOgv482o4Rbs3wpulVUFkYTCS+JD SaZwgiobfAbqlL836EPcY/cRo3i9aPvLeYK0vvb5yqPylZy+6heXokCnP8iFNy6xCw/5 V/Sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=oWhV/aM7cHTx5ZTQ71/RJ8WdQmdRB7WJv+92VXqEVEk=; b=HekIVqhIVCZW+WkSABe4JzproMv26kvQskBBmF8bFNJnp1wCwX+OXifmTzMI27TTDa +6DAqSmNH++pqXN9ZDg4/QdVO18j6n2xGhbFFsGhgwQVl3lRqzEKf2Ng9CgT06nl20JX As5pYtpCrjFUMhPxuskzIGgUEwOhwXeh0WM/FleR6tWuVyO/Fo5ZJECDJ7dNMTsthhmv kiW6Tq47a66jl6dm36h53Ud6YUAePvqfs0wJgrXJOgcLZCqgo3jhkyRAuore27ji2Uil 8M3wzBNo7k1oSyf49O0y8Rfzjb1P5SkqwFj6c4cORVxiQIL00irGzwYk1XOg2AeIG0Rt Xm8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=MeJZkilu; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=HCxlKJjE; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id co27si15188878edb.376.2021.03.04.01.01.07; Thu, 04 Mar 2021 01:01:30 -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=@linutronix.de header.s=2020 header.b=MeJZkilu; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=HCxlKJjE; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346363AbhCCNKo (ORCPT + 99 others); Wed, 3 Mar 2021 08:10:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351531AbhCCIQq (ORCPT ); Wed, 3 Mar 2021 03:16:46 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2B05C061356; Wed, 3 Mar 2021 00:16:01 -0800 (PST) Date: Wed, 03 Mar 2021 08:15:59 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1614759360; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oWhV/aM7cHTx5ZTQ71/RJ8WdQmdRB7WJv+92VXqEVEk=; b=MeJZkiluH46DY+UERW7+8yNVlKzo9BI6Xp+h4j7Rv9wk468lBXeakHL4dMw90rR1uV/A8d rugTuDKKVWoOOvchksKyPneB9FpMsmVuwzZHCvqyVPjnSRxbGgfwnE+CmBtCCAcVTnKpxo s0ri5yCT0j7Z3ip5W/cECDEiGVCrYec6QixXJEq1UoGHNOUbmZ8Kt2Bq6kBk9oXdiR7s6Q OTrYxDfS92+p2Tf+okgFXfPwk19JP+R0wsO8ziWlTu2ARC8usxF8NQJYU3xa/YSXeRUoGM dKzXUBioQdE4Rq+3lAuA2AK7qXMeAjkIFmKIQOoqfZ/jAofSOrweM7nT2XLI6A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1614759360; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oWhV/aM7cHTx5ZTQ71/RJ8WdQmdRB7WJv+92VXqEVEk=; b=HCxlKJjESpVRdmZpu8Fe2Cw2U7nUFHUJmGg8OABQpLMSaKtCtO5pk1l9UwV0aqEwfC6q8H BgYdpYBtiQj1BfDA== From: "tip-bot2 for Jason Gerecke" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: locking/core] x86/jump_label: Mark arguments as const to satisfy asm constraints Cc: Jason Gerecke , "Peter Zijlstra (Intel)" , "Steven Rostedt (VMware)" , Josh Poimboeuf , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20210211214848.536626-1-jason.gerecke@wacom.com> References: <20210211214848.536626-1-jason.gerecke@wacom.com> MIME-Version: 1.0 Message-ID: <161475935972.20312.14663258597445798760.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the locking/core branch of tip: Commit-ID: 566a9522381495d27b596ee3bdc9578ba02a895d Gitweb: https://git.kernel.org/tip/566a9522381495d27b596ee3bdc9578ba02= a895d Author: Jason Gerecke AuthorDate: Thu, 11 Feb 2021 13:48:48 -08:00 Committer: Peter Zijlstra CommitterDate: Tue, 02 Mar 2021 15:06:34 +01:00 x86/jump_label: Mark arguments as const to satisfy asm constraints 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= =E2=80=98asm=E2=80=99 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. Signed-off-by: Jason Gerecke Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Steven Rostedt (VMware) Acked-by: Josh Poimboeuf Link: https://lkml.kernel.org/r/20210211214848.536626-1-jason.gerecke@wacom.c= om --- arch/x86/include/asm/jump_label.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/jump_label.h b/arch/x86/include/asm/jump_la= bel.h index 06c3cc2..7f20066 100644 --- a/arch/x86/include/asm/jump_label.h +++ b/arch/x86/include/asm/jump_label.h @@ -20,7 +20,7 @@ #include #include =20 -static __always_inline bool arch_static_branch(struct static_key *key, bool = branch) +static __always_inline bool arch_static_branch(struct static_key * const key= , const bool branch) { asm_volatile_goto("1:" ".byte " __stringify(STATIC_KEY_INIT_NOP) "\n\t" @@ -36,7 +36,7 @@ l_yes: return true; } =20 -static __always_inline bool arch_static_branch_jump(struct static_key *key, = bool branch) +static __always_inline bool arch_static_branch_jump(struct static_key * cons= t key, const bool branch) { asm_volatile_goto("1:" ".byte 0xe9\n\t .long %l[l_yes] - 2f\n\t"