From mboxrd@z Thu Jan 1 00:00:00 1970 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=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 62970C432C3 for ; Sat, 16 Nov 2019 15:43:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2E146207DD for ; Sat, 16 Nov 2019 15:43:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573919030; bh=wo+kHZoyoS7oHu/A2S/tiL8OH7NmOb8wH1ta0RZG9H4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=ewHwchoUKX32ruyY2lcb07O1j27rTwkU/84woNMFYXYD5ifatyKI7z0pGNCgvitVM vXzMPP9KUPmywhfMEQH/g1rJgmboTZcHjj0w61ow1fuuoHnoNYkQ409RUWFi6g7+MF y2+hU98tQrdEh9qNLVK5HxR43uMB1M4pY9GiSi0k= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728856AbfKPPns (ORCPT ); Sat, 16 Nov 2019 10:43:48 -0500 Received: from mail.kernel.org ([198.145.29.99]:47918 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728812AbfKPPno (ORCPT ); Sat, 16 Nov 2019 10:43:44 -0500 Received: from sasha-vm.mshome.net (unknown [50.234.116.4]) (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 7B24020815; Sat, 16 Nov 2019 15:43:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573919023; bh=wo+kHZoyoS7oHu/A2S/tiL8OH7NmOb8wH1ta0RZG9H4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aUMP/SLF3jYflAngV++2h1UV3ueCR9VqDIdWJv6K7lM3cEUf9+maHxO0ygkaDjww/ lY9qcbtoPNnTkZhc268TXwF4aHnLAQSxR9LV0zGXZ1n8K8WAe99ICKiKs/8Pf1hpKi WLkTW1aPJJIOnL/hLiNDRM7Ocig+uNM6DKr3l8gk= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Geert Uytterhoeven , =?UTF-8?q?Niklas=20S=C3=B6derlund?= , Eduardo Valentin , Sasha Levin , linux-pm@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 122/237] thermal: rcar_thermal: Prevent hardware access during system suspend Date: Sat, 16 Nov 2019 10:39:17 -0500 Message-Id: <20191116154113.7417-122-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191116154113.7417-1-sashal@kernel.org> References: <20191116154113.7417-1-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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: Geert Uytterhoeven [ Upstream commit 3a31386217628ffe2491695be2db933c25dde785 ] On r8a7791/koelsch, sometimes the following message is printed during system suspend: rcar_thermal e61f0000.thermal: thermal sensor was broken This happens if the workqueue runs while the device is already suspended. Fix this by using the freezable system workqueue instead, cfr. commit 51e20d0e3a60cf46 ("thermal: Prevent polling from happening during system suspend"). Fixes: e0a5172e9eec7f0d ("thermal: rcar: add interrupt support") Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Signed-off-by: Eduardo Valentin Signed-off-by: Sasha Levin --- drivers/thermal/rcar_thermal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c index edaa4058686b7..4dc30e7890f6c 100644 --- a/drivers/thermal/rcar_thermal.c +++ b/drivers/thermal/rcar_thermal.c @@ -434,8 +434,8 @@ static irqreturn_t rcar_thermal_irq(int irq, void *data) rcar_thermal_for_each_priv(priv, common) { if (rcar_thermal_had_changed(priv, status)) { rcar_thermal_irq_disable(priv); - schedule_delayed_work(&priv->work, - msecs_to_jiffies(300)); + queue_delayed_work(system_freezable_wq, &priv->work, + msecs_to_jiffies(300)); } } -- 2.20.1