From patchwork Tue Sep 8 15:25:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 309958 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9259AC433E2 for ; Tue, 8 Sep 2020 19:02:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 545C82087D for ; Tue, 8 Sep 2020 19:02:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599591757; bh=MEokPjVflEq2PyM5DqEXjd/vCI5oiXcl4gUH3vH5M7o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=nvOLnTUQjGf6LlQHuY2pzC2Go8Iqr1mCkn2DIAVaxByarLckrlW7wdSvhjVYDD4QS MXv95hQKoB23SEoRIrJ9fBvByULzOAYNnXLTe4e6ZzdCJRIMns6gUnd1KepRbVgmMl q4k5zHNyAjkQy6KW4ghnu5ZaCRaqTtNPwKu5E4aw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728572AbgIHTCe (ORCPT ); Tue, 8 Sep 2020 15:02:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:55024 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731289AbgIHQIC (ORCPT ); Tue, 8 Sep 2020 12:08:02 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EBA2423EF5; Tue, 8 Sep 2020 15:47:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599580072; bh=MEokPjVflEq2PyM5DqEXjd/vCI5oiXcl4gUH3vH5M7o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D1OwNVFB4FVDYf0+CWJEkqEchdcElDVL6kCWTlOriyqOc4TQs6U/2R09biOkObSfj s7H9MAmeQsEUKzVe8MNYIAhZuwe5wsLO6CFzScPwRr+nqE2uQiA7PVO+BiXagi4QRF VPE1WmBYXSJJXCTJrXOFLFPrCdEsPfFxiC9Gy6tw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Peter Zijlstra (Intel)" , "Steven Rostedt (VMware)" , Thomas Gleixner , "Rafael J. Wysocki" , Marco Elver , Sasha Levin Subject: [PATCH 4.19 12/88] cpuidle: Fixup IRQ state Date: Tue, 8 Sep 2020 17:25:13 +0200 Message-Id: <20200908152221.703901228@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200908152221.082184905@linuxfoundation.org> References: <20200908152221.082184905@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Peter Zijlstra [ Upstream commit 49d9c5936314e44d314c605c39cce0fd947f9c3a ] Match the pattern elsewhere in this file. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Steven Rostedt (VMware) Reviewed-by: Thomas Gleixner Acked-by: Rafael J. Wysocki Tested-by: Marco Elver Link: https://lkml.kernel.org/r/20200821085348.251340558@infradead.org Signed-off-by: Sasha Levin --- drivers/cpuidle/cpuidle.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index 6df894d65d9e2..2d182dc1b49ed 100644 --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c @@ -148,7 +148,8 @@ static void enter_s2idle_proper(struct cpuidle_driver *drv, */ stop_critical_timings(); drv->states[index].enter_s2idle(dev, drv, index); - WARN_ON(!irqs_disabled()); + if (WARN_ON_ONCE(!irqs_disabled())) + local_irq_disable(); /* * timekeeping_resume() that will be called by tick_unfreeze() for the * first CPU executing it calls functions containing RCU read-side