Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp91924pxa; Fri, 21 Aug 2020 01:58:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7BGMECHYuZYB8W7jIRlzBK5BopSezd/8YKQdUaxAqxtp66yUCSp/iPhJDBdwdGxy7kqvK X-Received: by 2002:a50:e109:: with SMTP id h9mr1811068edl.47.1598000293535; Fri, 21 Aug 2020 01:58:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598000293; cv=none; d=google.com; s=arc-20160816; b=oHMfkkVd5Od9RMej7fJvu9VvKSVv5GHIJGKSirDwK+RmZ681E6axol2c/MGUcLT0GS vMBHVQXHMPrL6jW8JU0Ozv0txNApb57Q/CweqqDo3sTJPWfXnkzKS+0L5x7SvBZQworl mUIRyGEnRDUC2SmcEeG+LrMCCcBtHLYIGVFX2KyP4POpWg27/die5v24eS+SQnD4q7+S AEreDO8cE0z5HAfBfN39HIVO+PVeSzM2YFgnF20qVe8fIG4uCHkzBhdhX/bY+cclwRur INoidLcSO137cmHzt1LkQli/SPXomvSEIqOKkHj9gAOmbs9AOFVHcXvVBELXevyAcFHK uQlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:subject:cc:to :from:date:user-agent:message-id:dkim-signature; bh=nO3hfxUMWOif6mGKcbiJTNQNHWgwXTgjZLQJGqmnWhw=; b=NnMIQ3ygeDVlymngOTB0ewP8xEFls4VtypppvYQVsyHZapFZYtGl2gu3cgSVXqvccP +xjptdOzKYIS5+IkKOTawpPRMem5+YiHdg0HLPtrxNAnV9/iyO3Fw0+ytqEUT4nfcDid vhUUUZhcG4QZW9wx3yF8qpmTLPL/HcwRbHC2Jhw+rc0OAg55tlRVoxUPo0ybY5uI9Kxp MwbSSJnMNMWITGTPvYt/sOhiLlkKSQajs2xsfM0ObguLAKhpHoDivSChYPAGIF0NB2b/ wosYGLwhbUq05kADJtVBCbHCfIrmO4cFSXlZpUxKRhnerz7ZFOtJo+sHXKeLmP7SIVab /nxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=DPr3tO+0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v7si824414edq.227.2020.08.21.01.57.50; Fri, 21 Aug 2020 01:58:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=DPr3tO+0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728334AbgHUI4u (ORCPT + 99 others); Fri, 21 Aug 2020 04:56:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728241AbgHUI4l (ORCPT ); Fri, 21 Aug 2020 04:56:41 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE424C061388 for ; Fri, 21 Aug 2020 01:56:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Type:MIME-Version:References: Subject:Cc:To:From:Date:Message-ID:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:In-Reply-To; bh=nO3hfxUMWOif6mGKcbiJTNQNHWgwXTgjZLQJGqmnWhw=; b=DPr3tO+0p2sAaTRRAtLHqCDFfO gneWpT4Gz6sO4Ec1GTUrqJY/GCBtp+aTiwWSC6lPniBWhmozxzVMuFIkp3tBUzQVsfulR9XUANCQK m1Oz3QzQSe1m5Xb2ZTMubKW9M+LLGzAanTzI9DADsYP3nwWFRApwebYsJ54acYpWndpKEGdfgU1Gs l5ksbM+XdxPRPh6Yo7CaFzzLKfZVJG06FTk/mVJGjpTOKRXg0r3YiBdgnIU0oozYzmP9DOMCLf+Fe 80ASaPafKa7fpevvwQdZsXAln8b7+ALiEVjXJFJ8e4c/AbrT6wvnCbu5RT955xC+7Xw9zur6b/84R BmbPl3dg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1k92pJ-0007Rf-4Z; Fri, 21 Aug 2020 08:55:12 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id F0609303271; Fri, 21 Aug 2020 10:54:49 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 0) id DB4C02B649914; Fri, 21 Aug 2020 10:54:49 +0200 (CEST) Message-ID: <20200821085348.251340558@infradead.org> User-Agent: quilt/0.66 Date: Fri, 21 Aug 2020 10:47:40 +0200 From: Peter Zijlstra To: linux-kernel@vger.kernel.org, mingo@kernel.org, will@kernel.org Cc: npiggin@gmail.com, elver@google.com, jgross@suse.com, paulmck@kernel.org, rostedt@goodmis.org, rjw@rjwysocki.net, joel@joelfernandes.org, svens@linux.ibm.com, tglx@linutronix.de, peterz@infradead.org Subject: [PATCH v2 02/11] cpuidle: Fixup IRQ state References: <20200821084738.508092956@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Match the pattern elsewhere in this file. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Steven Rostedt (VMware) Tested-by: Marco Elver --- drivers/cpuidle/cpuidle.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c @@ -153,7 +153,8 @@ static void enter_s2idle_proper(struct c */ 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