Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1057390pxk; Mon, 31 Aug 2020 08:40:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymZLP/vZPZJPDbOxU/9Hytm+fGWDWv5J4NrUxVloM2y4qVDY//EKuiaLae4wGrSEHzEWGB X-Received: by 2002:a50:f28b:: with SMTP id f11mr1726411edm.44.1598888404718; Mon, 31 Aug 2020 08:40:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598888404; cv=none; d=google.com; s=arc-20160816; b=FH4cnYeQQKIFx1nJlDwP+FuKUFZ+Ljfn3cWadMXTEOHSfY8HhsLmCRA+gAXKYhyjtd J5fZyAX34SuMvY5M3ITRsQn7+aJ6hsBOwebmfMsC2ZIci5sId01meDAVivDb5+qXP2g3 pVU4LhFh/lbTqj4EEUtHPfTdj6unllyv3KHs79Slpb8Ws40NavCn3GEagDs8Btjm84pz wYNv56LqxOya33IyufaTlL8NhPMcb0BRA07j31oCQnU8gwQt96AQJWE+7/I5l9BFkNsx 0y/ZWhRA82JxQzJ/ig1IbZrkwRkPUtJeOp/kcXF/MifskidvsmmNSh0yV7Fw926c+7ME pE0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=P6QEgROzYiDDA04IqMBwadz14nl5I4v8yKrqjfBKRLk=; b=TKBqEWJI2pFhTH8F6CdY+rPVjJJndtz44v1NoeWau1+RkniYr1pPM34MM/xklmq7Qh 4uG2qQksQekQlVQFGj8LKx2N9XaIQzTGo1DFwQ85dGq1PXPOcjYQ05zvEDgB1XtJxePI lBi9cYBg1ntLD9dUFbphVPMPHuuhlqHqjvQZLxpC6ovoS0qImZOFjhjR0nsWVTXq0gy6 9jSOLT9MQV/axzesY5EgIqJbuiIq/U4A0PIry5UZtlfKiOlwvz8SQCNWa8jU99cUa7v8 efOUhspiocZQp+wxYXxcPJg89nNSY3uXHB4FpL4d6319n+tTI+KvowwqaHxuOz/q1aOj Lr7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jqTlza5I; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v26si1455246eja.287.2020.08.31.08.39.40; Mon, 31 Aug 2020 08:40:04 -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=pass header.i=@kernel.org header.s=default header.b=jqTlza5I; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728654AbgHaPa3 (ORCPT + 99 others); Mon, 31 Aug 2020 11:30:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:39598 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728581AbgHaPaT (ORCPT ); Mon, 31 Aug 2020 11:30:19 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 420B02083E; Mon, 31 Aug 2020 15:30:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598887819; bh=PpOTd+1JuLVd/oGNLu014WCPcxYLqueUtP1FoVeSTfg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jqTlza5IIZqwpEW1OU3+TW5bFldNsXdG3980VmfciXYEMlXU+AkFg6SRRenfOAcLr BV3Ug1udLb64wx1CLHY28eFzDRiEoFb9FeQ5CTo7ArOz/tHocIN9YOTfMFe+zdUAji XIn5lUvljO4TR0AhmiTjwhCQQEOVNhBFzrHG6JXw= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Peter Zijlstra , Steven Rostedt , Thomas Gleixner , "Rafael J . Wysocki" , Marco Elver , Sasha Levin , linux-pm@vger.kernel.org Subject: [PATCH AUTOSEL 5.8 30/42] cpuidle: Fixup IRQ state Date: Mon, 31 Aug 2020 11:29:22 -0400 Message-Id: <20200831152934.1023912-30-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831152934.1023912-1-sashal@kernel.org> References: <20200831152934.1023912-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 87197319ab069..2fe4f3cdf54d7 100644 --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c @@ -153,7 +153,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 -- 2.25.1