Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp5993579ybc; Wed, 27 Nov 2019 13:04:25 -0800 (PST) X-Google-Smtp-Source: APXvYqyBVyNYwbuzedQDRYeOA5/68pGvk2oGfdyDeqifyHKd7xrdYnilp9Q/WYx5tBGdsKakTykG X-Received: by 2002:a50:fb8f:: with SMTP id e15mr3469435edq.239.1574888665308; Wed, 27 Nov 2019 13:04:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574888665; cv=none; d=google.com; s=arc-20160816; b=r913ukmDiPWpGe2meyd2dMwIOgwH8Z0ZtDPvku+AskLZEMxvZ3L/B5BA1ECtSRyq4w ND4bGSrfBZQe+0Q7XkfuBeRHAw8mwlqLMIQetnvlvbVDMOfnG1O7ccLuXcQasZGmzQtT HkulMyeSfxT+RKIpfdS5mhdEhSK+8LtIFA/3paeuZVihV1phhe2pnlWd10U2+FnCtfP6 B4Ep6kXpwWQdKazIHK/W4JGmwy4ogfblUZg2nnCkdAHnnK1A+hs2za1kPoEJLelM2hNC zLf/FSx0huIbYwLL7opkbTOsonzjZD5uJ0JgFYPZtkFwwe398gpkMScVsRJwYrldu55G f1yA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=eeERmPA/vUACRyr9uPlcN0kdZZ/Esd8c8lsySTRWHwE=; b=e+YNFZWevd/u+y2c/Y3TJqN104gy8sO8oDeFjuo9FU5eh1vmwsMuhY6S+iF2+Pp1Hp BG2QE8JuA5bJg4/Y4bqO7+4uf7J6kQBEo1Po1V44atLWZ77KTfUm2l5Ibtnrmt5jdI0H HA5MeR0BNqGl7Yaf3Mdb9qnMjQoG2QSKW4jX+HhrHBohH1BR1JJg9sxs/6QxjwN6I/73 RWZbDConzqNyBntBstEFrnZlgj6MBZ2QWAreKqZ/ta9PqSW2m7e2J/uI1NLEMOARv2Kh k81vG33QJ3rKJsjKFTJoPmCwWuF0U4jqCp6UmxbNxjfRDouyqEeN0nYsNVyUxwi7v+cC YrnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rMw2VXpl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id df27si12362665edb.110.2019.11.27.13.03.55; Wed, 27 Nov 2019 13:04:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rMw2VXpl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731651AbfK0VBB (ORCPT + 99 others); Wed, 27 Nov 2019 16:01:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:53010 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731649AbfK0VA6 (ORCPT ); Wed, 27 Nov 2019 16:00:58 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 06D4520678; Wed, 27 Nov 2019 21:00:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888458; bh=wo+kHZoyoS7oHu/A2S/tiL8OH7NmOb8wH1ta0RZG9H4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rMw2VXplG/3Mf6Lx47K7MzZR8MzZ7DgU/nxM5YHxTvhWSUZOFjVKAMSr1R4Yt2+b6 v9x3Usw0RGWkH/qcnf8LVhmvTHkWv6x0vxvD5pRdLwz4uF7ptlz9YfNdlO7seCJ1+F gBTPW0X9GkN4o7si3gp0c4IBaRdjn9HWlqWgAWOk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Geert Uytterhoeven , =?UTF-8?q?Niklas=20S=C3=B6derlund?= , Eduardo Valentin , Sasha Levin Subject: [PATCH 4.19 140/306] thermal: rcar_thermal: Prevent hardware access during system suspend Date: Wed, 27 Nov 2019 21:29:50 +0100 Message-Id: <20191127203125.433603939@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203114.766709977@linuxfoundation.org> References: <20191127203114.766709977@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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