From patchwork Fri Jan 13 12:31:13 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: 43254 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp244026wrt; Fri, 13 Jan 2023 04:37:16 -0800 (PST) X-Google-Smtp-Source: AMrXdXvusxnj+uLuQCJOYpisZrCpUabtwu4AVwWN9bsrySCpGWodg9mwPI+7FxlB6oIjd0vJt+g3 X-Received: by 2002:aa7:d691:0:b0:499:c2c7:1534 with SMTP id d17-20020aa7d691000000b00499c2c71534mr13763239edr.24.1673613436807; Fri, 13 Jan 2023 04:37:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673613436; cv=none; d=google.com; s=arc-20160816; b=uqR+/ZTCyjVvyICgsrYhUW8NfvPPbodDXxsoxv43blosGuilwMkGtmptcbedszpgNZ 3TdF1qjyNZMZiM6Zu24G77RCcQtJKHHwTsMWg9fnLGeapGzTQKeAZfayCyvHO0/hO5EK jLUWaiIg5DR8nFC2sQ0qr20KhYd8zxmtr+GbKs351DtFvJBe59Tv5eAbqaTuLyoX7FWk lBivRW8dC5FZ3+wDCwKIfTebjXj21vFU9x5GQa9jtosC2YdJXc1xZA0oqx0ZpSCkWCi0 Jt/Hb4KYeqtCEIUQMmaah16XaeCjR2hoGlCIuLeiujszqvpTl7hUu/O2Zf+/2mS9vXyY Q7+w== 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=0mXTiSRpmroi1SGTJNXM+LzGN21KUYrGkkMyQ+4bNa8=; b=qLx0pUbByuPp1RD2nT8GOyQ2vyh1oeyC+roWQhn3cmmQEf7Jlu5KKXic9NCECd74td GR5F28h806PsTKatLW40+ak8ev+9/OPvyKr/XBBBh1mkFEDVJMT9ZThCK8+rzJqHt5aV 74GSSEwIimhV63GgUFs4NpI7u9n8I0IYUEP1vOVzVvGsmuny2IV4arrnNlE+iyyUFgtD JyC2k0g1EN4WrR1zB+6tqP/sKTsfFeI4cD+hPAebql7+2jeBVN8tS1hX5iz0Ycxrg6Fn BlIB/XnMKZq6gJ498FB6MEar+Wg7h6NGFYvs9JVjxDpElS7xYavT2QNv9S0hwDtY73SK JDtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=avfzgtDd; 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 h27-20020a0564020e9b00b0046bb35e06e6si1171894eda.149.2023.01.13.04.36.51; Fri, 13 Jan 2023 04:37:16 -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=avfzgtDd; 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 S241305AbjAMMfu (ORCPT + 99 others); Fri, 13 Jan 2023 07:35:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241123AbjAMMcS (ORCPT ); Fri, 13 Jan 2023 07:32:18 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E77B1559F7; Fri, 13 Jan 2023 04:31:14 -0800 (PST) Date: Fri, 13 Jan 2023 12:31:13 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1673613073; 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=0mXTiSRpmroi1SGTJNXM+LzGN21KUYrGkkMyQ+4bNa8=; b=avfzgtDduB0RoaHAPB6wK3zgKRyRq1icK1w3FcPeSne38H0mFb5MkgwCDACtcn54exZcFn Fvt5OeBcVkmHPB3hAGVRHZ6+ukvkAHe+20s6WxxMr5COG7G5o1IO2U/cWKK9nKv2ygjDXf rRIKBbnueV9WwT8ROYrl9sHsjA8/Z5wbAb+gI/rNM8LJTYiu4qf9N4sprkhwso37CKGWV0 KOl+xy6jBDVf1fF24W62YeBuCLHQQlqDAr6yA9yTvoeSdkDWB2+mlnUJ9Zt2ml+Z7BqdIV +SFFucWINORtnJzlYCcBqq/k3ZI6lwaPTSQLkT6y+KUaQ4u2IWBGKcN5ZRC45Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1673613073; 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=0mXTiSRpmroi1SGTJNXM+LzGN21KUYrGkkMyQ+4bNa8=; b=Y9YSU42sewHMa5b94NfQK6FHUm7I44ZPDjAHmtsMT6hrKkHNkJNmZkwLoxckhlTlBygmk3 fFX8P47VZL5E/ZAQ== 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] acpi_idle: Remove tracing 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: <20230112195540.251666856@infradead.org> References: <20230112195540.251666856@infradead.org> MIME-Version: 1.0 Message-ID: <167361307320.4906.12397957651023647321.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?1754848423578594712?= X-GMAIL-MSGID: =?utf-8?q?1754910882751238754?= The following commit has been merged into the sched/core branch of tip: Commit-ID: 8ce78470bf2dd1d08107736e813fa62e09aa4647 Gitweb: https://git.kernel.org/tip/8ce78470bf2dd1d08107736e813fa62e09aa4647 Author: Peter Zijlstra AuthorDate: Thu, 12 Jan 2023 20:43:29 +01:00 Committer: Ingo Molnar CommitterDate: Fri, 13 Jan 2023 11:48:15 +01:00 acpi_idle: Remove tracing All the idle routines are called with RCU disabled, as such there must not be any tracing inside. While there; clean-up the io-port idle thing. 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/20230112195540.251666856@infradead.org --- drivers/acpi/processor_idle.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index a589cfa..48fcd28 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -109,8 +109,8 @@ static const struct dmi_system_id processor_power_dmi_table[] = { static void __cpuidle acpi_safe_halt(void) { if (!tif_need_resched()) { - safe_halt(); - local_irq_disable(); + raw_safe_halt(); + raw_local_irq_disable(); } } @@ -523,8 +523,11 @@ static int acpi_idle_bm_check(void) return bm_status; } -static void wait_for_freeze(void) +static __cpuidle void io_idle(unsigned long addr) { + /* IO port based C-state */ + inb(addr); + #ifdef CONFIG_X86 /* No delay is needed if we are in guest */ if (boot_cpu_has(X86_FEATURE_HYPERVISOR)) @@ -569,9 +572,7 @@ static void __cpuidle acpi_idle_do_entry(struct acpi_processor_cx *cx) } else if (cx->entry_method == ACPI_CSTATE_HALT) { acpi_safe_halt(); } else { - /* IO port based C-state */ - inb(cx->address); - wait_for_freeze(); + io_idle(cx->address); } perf_lopwr_cb(false); @@ -593,8 +594,7 @@ static int acpi_idle_play_dead(struct cpuidle_device *dev, int index) if (cx->entry_method == ACPI_CSTATE_HALT) safe_halt(); else if (cx->entry_method == ACPI_CSTATE_SYSTEMIO) { - inb(cx->address); - wait_for_freeze(); + io_idle(cx->address); } else return -ENODEV;