From patchwork Fri Jan 13 12:31:06 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: 43228 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp242882wrt; Fri, 13 Jan 2023 04:34:39 -0800 (PST) X-Google-Smtp-Source: AMrXdXv88dRCMV+Iv0LpJzmxDLLpSLY5XUrvpY6HIVpyysgzRgrSJEvz2rWNYvvnGR9txdKFStiU X-Received: by 2002:a17:907:3490:b0:7c1:6e08:4c20 with SMTP id zx16-20020a170907349000b007c16e084c20mr27143236ejb.7.1673613279178; Fri, 13 Jan 2023 04:34:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673613279; cv=none; d=google.com; s=arc-20160816; b=RCOWUp9xfQBefqm9iho2R/MoTUk6vkbyBMi1xQ2RPm52Ctjh4tY7/Gpt+zJ6/zXEoN m4wRgr7sRV/z7Ok6IaQaKU4dfggzqDX74aj3LwVg6aYuq4XyrF0tYtMDbE9tOAE+QiZ1 uU9rni4eRoEbTrVOoMk5fufhWG8bRgL/EuRx7YNWanVU7IrGZa5IPV5y+k4vd+F0BvXm WiguZR1f9/LHHKrwKs9C3XfVC8dF/uyWhvVUtX69IPnAjAy8vxRS3uCDzj4OsYAnGDI/ oSj3r2DsiEYZqXZ1g/RBDv+iIMGoN57xVFMid9salrtD+0nEIxHRO3d6o5Mgd5NHAi1z jDNg== 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=hAbWbWFp5L/glYPOmdVPYhFeA2m/53BCTwuDYTVEMEs=; b=D0tkiZh2L4VX1cP9lhn7j0oui3CyiCcB1fc8F02OK/S30qWEix8Ys3Ek8cWSMN+txg bmzNFUypj3r4XhDICeU+OIfnXBsV2WRUwiYXdXfOI5d/W1UQ9jKn/tNCPIATwXq+bWSF p4PpZ3sUuEMPltsZxiNcFbyXesFerdk23VRdwxfPwZyvEKSoLHX4oWB9kerpyPbi+DyQ FG7dBKI4QxkcpcFf4OICHyf+roGqtvlktGR3q5FnqKqOe5BhekWUFAINnH9GHN/eWv0N vYxItvJDmom1gPmtQSNNhToUrnGCC4gOVdOqz8oLTflSAlIcweClIZrpH4a5+oCbn/GU w2Rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=c2Xg9tsM; 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 ae9-20020a17090725c900b007c10d4bddccsi22349565ejc.822.2023.01.13.04.34.02; Fri, 13 Jan 2023 04:34:39 -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=c2Xg9tsM; 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 S233035AbjAMMdV (ORCPT + 99 others); Fri, 13 Jan 2023 07:33:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241282AbjAMMcI (ORCPT ); Fri, 13 Jan 2023 07:32:08 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 244B350E6C; Fri, 13 Jan 2023 04:31:10 -0800 (PST) Date: Fri, 13 Jan 2023 12:31:06 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1673613066; 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=hAbWbWFp5L/glYPOmdVPYhFeA2m/53BCTwuDYTVEMEs=; b=c2Xg9tsMQin8MhuGwZMegWwt5I8Xns76thjtfPd65ZLxn8znq7GqwwNCnYJrRUNSQXaR31 EsXGo6/XHESDeQzAHADfW5dM7GvxxHpahXk6U/ZrVaF9ygO3JkfbafUUNO290dP16QatyP xAIh24Y8zeH34rgZ0M7zBW3lQDyfj7hhcC8UGTWb2OOsgVrdLZ2iMMcYY4XIQfOsVwcyK+ wgzMCHx67nzNIsz9DgKOEAazA6YKixiEjsJSZwHd2KyrjdpGWleRlgU7hDM/RHku5xjFDT 09CJvIr7hAQm5ZZfryh2EIzGGzNSlQoJzwTLJsODQIqL8SFoKtIMhqdRTC5zNw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1673613066; 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=hAbWbWFp5L/glYPOmdVPYhFeA2m/53BCTwuDYTVEMEs=; b=MKXKYAImy/ibaYTvpG+Mv+TSFMtwe9esW2aBSvR7JDzogaXpxSync/O0wE0CFJ/XT8sJHA N0A8uio1NhJLnlBQ== 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] intel_idle: Add force_irq_on module param 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.967699392@infradead.org> References: <20230112195541.967699392@infradead.org> MIME-Version: 1.0 Message-ID: <167361306638.4906.12963791326475300764.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?1754848500613254925?= X-GMAIL-MSGID: =?utf-8?q?1754910717713442509?= The following commit has been merged into the sched/core branch of tip: Commit-ID: 365bd03ff63fb7433a49c453472cf54830b677bf Gitweb: https://git.kernel.org/tip/365bd03ff63fb7433a49c453472cf54830b677bf Author: Peter Zijlstra AuthorDate: Thu, 12 Jan 2023 20:43:57 +01:00 Committer: Ingo Molnar CommitterDate: Fri, 13 Jan 2023 11:48:17 +01:00 intel_idle: Add force_irq_on module param For testing purposes. 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.967699392@infradead.org --- drivers/idle/intel_idle.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c index 7b996a0..e2d64a8 100644 --- a/drivers/idle/intel_idle.c +++ b/drivers/idle/intel_idle.c @@ -1837,6 +1837,9 @@ static bool __init intel_idle_verify_cstate(unsigned int mwait_hint) return true; } +static bool force_irq_on __read_mostly; +module_param(force_irq_on, bool, 0444); + static void __init intel_idle_init_cstates_icpu(struct cpuidle_driver *drv) { int cstate; @@ -1889,8 +1892,10 @@ static void __init intel_idle_init_cstates_icpu(struct cpuidle_driver *drv) /* Structure copy. */ drv->states[drv->state_count] = cpuidle_state_table[cstate]; - if (cpuidle_state_table[cstate].flags & CPUIDLE_FLAG_IRQ_ENABLE) + if ((cpuidle_state_table[cstate].flags & CPUIDLE_FLAG_IRQ_ENABLE) || force_irq_on) { + printk("intel_idle: forced intel_idle_irq for state %d\n", cstate); drv->states[drv->state_count].enter = intel_idle_irq; + } if (cpu_feature_enabled(X86_FEATURE_KERNEL_IBRS) && cpuidle_state_table[cstate].flags & CPUIDLE_FLAG_IBRS) {