From patchwork Tue Jan 31 14:22:26 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: 50885 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2778767wrn; Tue, 31 Jan 2023 06:25:03 -0800 (PST) X-Google-Smtp-Source: AK7set9mmo/kT6VFg+y3zNwhlsxKKoS+0WPs5DWYA5p+rJhayIMFmofjKZeQ0DLTLsZ80EhYdJNW X-Received: by 2002:a17:907:3c02:b0:882:6bd7:70c9 with SMTP id gh2-20020a1709073c0200b008826bd770c9mr11041296ejc.15.1675175103468; Tue, 31 Jan 2023 06:25:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675175103; cv=none; d=google.com; s=arc-20160816; b=X5tWurMlpTwCUhguVXd3n9tu/1zHwrxulzEb6wmniQtPBjB2XrqqKjU1TSpRULES77 lgXQ3JaurxnyaSXqi+lWB6QPo6eqCREjgs5UybQ/semyVdJZUjFG9ci/pdvb7NzYlLcV 0nOLKhCCV/QjgrkhAbhw8MKnMZxaZ9SmE2XkdKecNZecHE7CbIryiGMYtip2bDMKR8zx 1bgxZmGbw4grak+Ve6mwUJxxzFhMuHN3YiPoP2c7ggyljE7R5j48SUTXMXCI7GVIJT2i blDaBgL3QvyxEXw8TotpWzofGsAWRScWbRimn6Pn4JS5mePZkHHqini1td4Dxgeq0rSC 9Glw== 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=HeesFkyJpgmdoB5mc6HRlpXKR0i4W5Ofb0R0giGU8H4=; b=qXx3JKWbcE0VbdzUgyVdagtm+dNVVcZ1L1k6wcWNGmezOdxCDOPGiBvPz8A8sDFEC+ U/9N2SInGOM0EYAwSp2eNWIEQ7EjvoA+MveSXkhBPTLOsf0kTYy0jqEjBo+fOIbGB1Qa f7q26IJEFzK9HuFwDoM1jjOxxqHV5Y3/TyLavAiP3g6sLUZHlg+TDgtdbXiTH5Y8mc02 4PKUMN9aah+5tX0ITbXM8OXHhlSSGaPffZ0PtjPSCOBVHgKeRi+326wh800KJWigjI2n 87pU9h/rtQ2n36lZfHwB+oHdLvWB4r8+line9QDt95FGeIVh7bcZY2hMw+Yn5SP6a6Fk vrxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=TqArNT8v; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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 zu22-20020a17090708d600b0087bce26e653si14221824ejb.872.2023.01.31.06.24.36; Tue, 31 Jan 2023 06:25:03 -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=TqArNT8v; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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 S231405AbjAaOWa (ORCPT + 99 others); Tue, 31 Jan 2023 09:22:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229624AbjAaOW3 (ORCPT ); Tue, 31 Jan 2023 09:22:29 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82CC414229; Tue, 31 Jan 2023 06:22:28 -0800 (PST) Date: Tue, 31 Jan 2023 14:22:26 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1675174947; 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=HeesFkyJpgmdoB5mc6HRlpXKR0i4W5Ofb0R0giGU8H4=; b=TqArNT8vhNEcdvFwtnSt6tTZWObxOvdbHnh8kpMhdWAehQb+VbqpJSVn/+9BstRuvOFSAm KD8Zuyvv7IKRG1iRTJHdQKcPKkJRcGee8ZgfcI6IbvlvpYicCL1Rd8pvhCBycXRLs2bHgn kYpxDHlkNlpxG8HJlQW73aaIJ8iQ/aYH31f8hkMla1GOdrXzXEyuT4k+8c7hqPQ9EoYtEP qj12qX7wC27xjSCv9eG3sdb9o4YIsiYRgReCCzxj3Qe16ZKPuEkYKIy9idLwV6xU79KaZj FvG1PrKeUiuhjO/H/k3TybSm+8Xz5vKg6dI/RvW3P75DDcWNsUiZRdqDEx5ozA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1675174947; 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=HeesFkyJpgmdoB5mc6HRlpXKR0i4W5Ofb0R0giGU8H4=; b=NlzxGtH2f5GmNpUMkjSj4Z6R7Euj4675Uxp2YKjEIsSYVEs1XioHEsgNFZNiiY+21+GoB0 HDhGy7oaLVtZZcCg== 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: Fix poll_idle() noinstr annotation Cc: kernel test robot , "Peter Zijlstra (Intel)" , Ingo Molnar , "Rafael J. Wysocki" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <202301192148.58ece903-oliver.sang@intel.com> References: <202301192148.58ece903-oliver.sang@intel.com> MIME-Version: 1.0 Message-ID: <167517494639.4906.1628335276634090502.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?1756548408797392951?= X-GMAIL-MSGID: =?utf-8?q?1756548408797392951?= The following commit has been merged into the sched/core branch of tip: Commit-ID: 4d627628d7584f3d3add1d53342d0f01aa878e04 Gitweb: https://git.kernel.org/tip/4d627628d7584f3d3add1d53342d0f01aa878e04 Author: Peter Zijlstra AuthorDate: Thu, 26 Jan 2023 16:08:38 +01:00 Committer: Ingo Molnar CommitterDate: Tue, 31 Jan 2023 15:01:47 +01:00 cpuidle: Fix poll_idle() noinstr annotation The instrumentation_begin()/end() annotations in poll_idle() were complete nonsense. Specifically they caused tracing to happen in the middle of noinstr code, resulting in RCU splats. Now that local_clock() is noinstr, mark up the rest and let it rip. Fixes: 00717eb8c955 ("cpuidle: Annotate poll_idle()") Reported-by: kernel test robot Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/oe-lkp/202301192148.58ece903-oliver.sang@intel.com Link: https://lore.kernel.org/r/20230126151323.819534689@infradead.org --- drivers/cpuidle/cpuidle.c | 2 +- drivers/cpuidle/poll_state.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index 500d172..0b00f21 100644 --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c @@ -426,7 +426,7 @@ void cpuidle_reflect(struct cpuidle_device *dev, int index) * @dev: the cpuidle device * */ -u64 cpuidle_poll_time(struct cpuidle_driver *drv, +__cpuidle u64 cpuidle_poll_time(struct cpuidle_driver *drv, struct cpuidle_device *dev) { int i; diff --git a/drivers/cpuidle/poll_state.c b/drivers/cpuidle/poll_state.c index d25ec52..bdcfeae 100644 --- a/drivers/cpuidle/poll_state.c +++ b/drivers/cpuidle/poll_state.c @@ -15,7 +15,6 @@ static int __cpuidle poll_idle(struct cpuidle_device *dev, { u64 time_start; - instrumentation_begin(); time_start = local_clock(); dev->poll_time_limit = false; @@ -42,7 +41,6 @@ static int __cpuidle poll_idle(struct cpuidle_device *dev, raw_local_irq_disable(); current_clr_polling(); - instrumentation_end(); return index; }