Message ID | 20231124223226.24249-4-frederic@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp1580684vqx; Fri, 24 Nov 2023 14:33:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IGhWID1TrF1ak6TBXO0dedf6nF+kPuuC6ZWB2XQC+0NnB02VcaZYV+QtZ4EgmOLnZKvkLCo X-Received: by 2002:a05:6a00:8ce:b0:6c3:1b7d:ecee with SMTP id s14-20020a056a0008ce00b006c31b7deceemr5783483pfu.15.1700865207762; Fri, 24 Nov 2023 14:33:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700865207; cv=none; d=google.com; s=arc-20160816; b=YWzJCcvoME1NGW4Qab2h3kVrKBV+1Q0xDNF/plADWfahpWNHpndYMff1ByNcZ7+Na7 4MlHqPl3mddGvQZYV4b0LKsLLXxPd4KRyY9OBEtYUggUgKn6MaJzXbAd5t1LyGw42pio SZNwnVUBiaYA+I0B9nU41+BCEDDr/EHLmH/wRT6PVsRlmEPYQRoVZLp8BtW7tXZYusrG jU24JN9zrSnGEDIuF2IaVmcRZBuUNmhKMYiblqrkK1wHuEZNOAqiWtsBp4jf+1Wn7y01 eCcNbtXLiD146NTdZ3rKHKv/2DYlqJHuO2FFbmnB3sln47Wl1Y/wXEvBnLuD4D4t02iP 0kBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=L9AD4npZHNE7p07jGPwHmr8Xy3EVUnv33DYi1PDLLmQ=; fh=kadRONg1sMHv05REhOXqG2OstPrHhRU52xPLYfj4eAI=; b=tVPwjM6ksszVt0bm07wYksW2H96vOGYxcr0vVVgb8e4h93VKhQmI4O1Z+gDz4cgEHs lcX8xdOHTGqwEXXYgHVBzGTQmb+OQMzi2JqnrMYc3HFCwz23Hh+ARUR5cJ6CPe5+eT99 Jfnr9v37nvq74h2hz3Mzu7NQbttZI0PfmBB6NOvANk24ofq03dFbzdQ4e/WP3jGe8RNx blDz0Sp7N8nm/i1bauTUc05C8apEU9+hfFY1WgNX0vPDfPxvJpY5rXOu0mpe1SKLRKH6 C09OdH1jPjUvoxxFXRnqc5lUYJrC0vIVC1cPYKolPAKK6wlWuNGtrDSwFb1YeRfEeF1d ztQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rHOgFJue; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id cn4-20020a056a020a8400b005b9b68add85si4534793pgb.254.2023.11.24.14.33.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 14:33:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rHOgFJue; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 8E58880C4DBC; Fri, 24 Nov 2023 14:33:22 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231512AbjKXWct (ORCPT <rfc822;ouuuleilei@gmail.com> + 99 others); Fri, 24 Nov 2023 17:32:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231532AbjKXWco (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 24 Nov 2023 17:32:44 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC7B610E2 for <linux-kernel@vger.kernel.org>; Fri, 24 Nov 2023 14:32:49 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 287BFC433C8; Fri, 24 Nov 2023 22:32:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700865169; bh=sUhE/qFaIDHh5RCqYIo7aaxz5Ifr+Yh3RMfcwpeT7hc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rHOgFJueqacJh3oSGholAxY008YeuYv2dLD8Hx1i+J42ckaCsPEue+U26TfZlARwm JZW9by+SVFIhonSoEAeY96DUR5A6LRpOk6l+X5lW7jWz8WuKOZORla5W+Tk1XuALgj MYwIK3qgK9tew6YwvquWXqWd54fnBITkSQXVnS19hVQgzWyRlYjXhPvU4Rg1N4BvgV AjpcEKOFBoBsU0hsUGCECscZ6jxHwYsEELkWxGucl5t5JB8X3Y+QjKZW/MajGaie0o MfNTU2ss+3GBqu3nevft7gW6YovD70zEZAYatkvvZs8AwuxvfnjJpAPewKS2KYK1MV H6HsE5Vo/TsRA== From: Frederic Weisbecker <frederic@kernel.org> To: LKML <linux-kernel@vger.kernel.org> Cc: Frederic Weisbecker <frederic@kernel.org>, "Rafael J . Wysocki" <rafael@kernel.org>, Daniel Lezcano <daniel.lezcano@linaro.org>, linux-pm@vger.kernel.org, Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>, Dave Hansen <dave.hansen@linux.intel.com>, Peter Zijlstra <peterz@infradead.org>, Marcelo Tosatti <mtosatti@redhat.com> Subject: [PATCH 3/7] cpuidle: Remove unnecessary current_clr_polling_and_test() from haltpoll Date: Fri, 24 Nov 2023 23:32:22 +0100 Message-ID: <20231124223226.24249-4-frederic@kernel.org> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231124223226.24249-1-frederic@kernel.org> References: <20231124223226.24249-1-frederic@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Fri, 24 Nov 2023 14:33:22 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783486435924197907 X-GMAIL-MSGID: 1783486435924197907 |
Series |
cpuidle: Handle TIF_NR_POLLING on behalf of polling idle states
|
|
Commit Message
Frederic Weisbecker
Nov. 24, 2023, 10:32 p.m. UTC
When cpuidle drivers ->enter() callback are called, the TIF_NR_POLLING flag is cleared already and TIF_NEED_RESCHED checked by call_cpuidle(). Therefore calling current_clr_polling_and_test() is redundant here and further setting of TIF_NEED_RESCHED will result in an IPI and thus an idle loop exit. This call can be safely removed. Cc: Marcelo Tosatti <mtosatti@redhat.com> Acked-by: Rafael J. Wysocki <rafael@kernel.org> Signed-off-by: Frederic Weisbecker <frederic@kernel.org> --- drivers/cpuidle/cpuidle-haltpoll.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/cpuidle/cpuidle-haltpoll.c b/drivers/cpuidle/cpuidle-haltpoll.c index e66df22f9695..b641bc535102 100644 --- a/drivers/cpuidle/cpuidle-haltpoll.c +++ b/drivers/cpuidle/cpuidle-haltpoll.c @@ -28,11 +28,8 @@ static enum cpuhp_state haltpoll_hp_state; static int default_enter_idle(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) { - if (current_clr_polling_and_test()) { - local_irq_enable(); - return index; - } arch_cpu_idle(); + return index; }