From patchwork Fri Jan 13 12:31:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 43238 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp243381wrt; Fri, 13 Jan 2023 04:35:45 -0800 (PST) X-Google-Smtp-Source: AMrXdXuvQXfSbYOY94SH57RmZd18GeUnUXPQxUmH4yFUB6jT8kGMIozaewkSMbKzwBdi+XWMfA6q X-Received: by 2002:a17:906:1c59:b0:86b:49c6:259a with SMTP id l25-20020a1709061c5900b0086b49c6259amr1032715ejg.62.1673613345718; Fri, 13 Jan 2023 04:35:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673613345; cv=none; d=google.com; s=arc-20160816; b=wMh18Ay2yOpji323+s2vKC12BBSU93SbdHwWXQI+1xJMqgKqaTRMlQiLrBBmR483/X /tAC9RXnVNicOE3OMRGcxCtWm+DJEqMagux9OhNv9JvT75vw3G9JYRrMfDhU/iRsUrMe t/NqeLFVZrJqCC6+nxa4af5oc0wPkE7+zsriHo2mSMfeZ9j0bkZdKFdBdwUQW+2L/eeL WUhFgbDdHQ9BSJPsRzaRaoRyfPCQfRwPTP69pA4jyZ9Srzjd8Ai03tRVnFvQrzsu6F+E T3NZiQDB6Do5xdrodytDZlrls33A3Sxoq16id+I1UtXMY2PfKkPagUAhWFQemFG89dbB EVgA== 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=5/AIQa6/6PdQImwk8LxNXUYKCdtDXsmcJvvGo69yPMA=; b=U7ia1MCR7wuZdUptblgVbcNSCjogBf7XoVxz65n2GKdt96Zw88bHlcoVqd/ggP+T+D A91x6vk8NfpGjxT8UEJxXy21ut8RhA57ozfpMyzHaBEnLEClNPP8tdBZfe6XyNrNCUos LctcN1urKChuLuX/F2kDU0WJ7yqcrAKJnoTYuXoWFmVB302PYu27cjbk1XdV2893fSCk pyLOI+Ucwx1X+3lg3TzlqVssQ6g/sCJGSEx8SUaJ9vB0zq9WkFdT6yZjjz5vJU5Mc06K /kZ7IddL8bB0aC2tvtfpxWEGA9QhFHpqkqTrP0hJ3RmtdzQ6vNWOBHggvlCL960luqep nw6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=0G4JibI7; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ho36-20020a1709070ea400b0084c504a1160si13634258ejc.786.2023.01.13.04.35.21; Fri, 13 Jan 2023 04:35:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=0G4JibI7; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S241612AbjAMMe1 (ORCPT + 99 others); Fri, 13 Jan 2023 07:34:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240712AbjAMMcO (ORCPT ); Fri, 13 Jan 2023 07:32:14 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85CDB5471C; Fri, 13 Jan 2023 04:31:12 -0800 (PST) Date: Fri, 13 Jan 2023 12:31:08 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1673613069; 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=5/AIQa6/6PdQImwk8LxNXUYKCdtDXsmcJvvGo69yPMA=; b=0G4JibI7/F5FlXuk1zcnp6SK2NyLtb/H03s9jeECoyRz1od8zjLELpxnnVPLYhad7BvsTz h5APmhmktve7bZxlGonp8Cso2o7QLU7iiCeQnklD4Rx6u9HefAUGiDO9BBx2E0gPfghYim Pyz3UjvX//gJnHky7Qn5b2CwQg371z9JqndUPfYE64seAuKC5ed//iTk7viH8J/nNnZC0v M/g7Olq5WJHsSzVelzlFmJ4/CYNop8DZ1lqHdyYRscmzY4uU+K2Oc1nXuXSvEWHdmtQ88T u/aPThS2AkahRm2B/6mXeBkBMpJPA86cee++n20muWtcTGc/5npUAoA6SbRI5Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1673613069; 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=5/AIQa6/6PdQImwk8LxNXUYKCdtDXsmcJvvGo69yPMA=; b=9xSGGfX6RvHkmgjDt7qv1j0c0KBdUBOBioZ4W925est/ctKs4MMqAJhrwXDZWYx/IunyCx EN01dGAEtaYJijDQ== From: "tip-bot2 for Peter Zijlstra" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/core] cpuidle, nospec: Make mds_idle_clear_cpu_buffers() noinstr clean Cc: "Peter Zijlstra (Intel)" , Ingo Molnar , Tony Lindgren , Ulf Hansson , "Rafael J. Wysocki" , Frederic Weisbecker , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230112195541.233779815@infradead.org> References: <20230112195541.233779815@infradead.org> MIME-Version: 1.0 Message-ID: <167361306886.4906.9313097689901370295.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754910787585564694?= X-GMAIL-MSGID: =?utf-8?q?1754910787585564694?= The following commit has been merged into the sched/core branch of tip: Commit-ID: 10fdb38cee36b8dc4775e6fe4ad85e78bafdbd65 Gitweb: https://git.kernel.org/tip/10fdb38cee36b8dc4775e6fe4ad85e78bafdbd65 Author: Peter Zijlstra AuthorDate: Thu, 12 Jan 2023 20:43:45 +01:00 Committer: Ingo Molnar CommitterDate: Fri, 13 Jan 2023 11:48:16 +01:00 cpuidle, nospec: Make mds_idle_clear_cpu_buffers() noinstr clean objtool found that the mds_idle_clear_cpu_buffers() method got uninlined by the compiler where it called out into instrumentation: vmlinux.o: warning: objtool: mwait_idle+0x47: call to mds_idle_clear_cpu_buffers() leaves .noinstr.text section vmlinux.o: warning: objtool: acpi_processor_ffh_cstate_enter+0xa2: call to mds_idle_clear_cpu_buffers() leaves .noinstr.text section vmlinux.o: warning: objtool: intel_idle+0x91: call to mds_idle_clear_cpu_buffers() leaves .noinstr.text section vmlinux.o: warning: objtool: intel_idle_s2idle+0x8c: call to mds_idle_clear_cpu_buffers() leaves .noinstr.text section vmlinux.o: warning: objtool: intel_idle_irq+0xaa: call to mds_idle_clear_cpu_buffers() leaves .noinstr.text section Solve this by marking mds_idle_clear_cpu_buffers() as __always_inline. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Acked-by: Rafael J. Wysocki Acked-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20230112195541.233779815@infradead.org --- arch/x86/include/asm/nospec-branch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/include/asm/nospec-branch.h b/arch/x86/include/asm/nospec-branch.h index 771b0a2..e04313e 100644 --- a/arch/x86/include/asm/nospec-branch.h +++ b/arch/x86/include/asm/nospec-branch.h @@ -564,7 +564,7 @@ static __always_inline void mds_user_clear_cpu_buffers(void) * * Clear CPU buffers if the corresponding static key is enabled */ -static inline void mds_idle_clear_cpu_buffers(void) +static __always_inline void mds_idle_clear_cpu_buffers(void) { if (static_branch_likely(&mds_idle_clear)) mds_clear_cpu_buffers();