Message ID | 20221214131617.2447-1-johan+linaro@kernel.org |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp214257wrn; Wed, 14 Dec 2022 05:21:08 -0800 (PST) X-Google-Smtp-Source: AA0mqf4Y35E15bAPFt4K1FCzFP/PMhxO6SrDLCXUZJlAmKhhqOdWamaVaR9wpNCB//PsejRWaK7r X-Received: by 2002:a05:6402:241e:b0:45c:834b:eb59 with SMTP id t30-20020a056402241e00b0045c834beb59mr33148000eda.36.1671024068177; Wed, 14 Dec 2022 05:21:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671024068; cv=none; d=google.com; s=arc-20160816; b=xdxStpDwQ/zrbtMlCiv1ZfAwubAIpDvlKfPQLdv1Ek4B45F243Ah4atbgsUqYbhjkV 4aIMARKIeDbv725MhErcnwSWHqz3TE4WE0qw8ArxflHKCimsqcrRbp/R+P3B68pba8A3 JMwlXTqywTUv8faCAe4RJu9gJbCZ2x6NFir1a7I3NiE99NaNRHHJgPvF3IILB5M0HSUF iOqXc0pUOYUhU1+AWsjKdJa699iZBSrIjmAwqVsrW23WC2LSB7szPuE7R7TUid0sn6/V RGpsf9fPa0RSNpNjCMRbf34v5GNcsRpiYWZ5yDFn4v142pPsDydWiPk02a683fnjiXQ7 ZOhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=jfpLPoZ4MItRAX60H0D9mv+OcZXVkS+xTtkH5vdpqnM=; b=YAVBu0GD35AMh8lihpky/JjxSfoputPHb+n+rxNgPmbJYgKPVBdrKJPUDCxNo6DFjy 4JLz516MsNoQoxudytaI2jgtwv8cfJ5cmAtPbFT/mG8dlRQ+5VI52IHXl59yCb4cY4b7 CnLitTsSpzLGJz7QHAhqG8U5i73ncUKNaB9s2+xa1vAjb0MpXhuy759XdIYjCoUc9Vza a+hhxNKE6YJX5NDrN6Pt9SvehsfR4UIE6qLU7BB4/6IZivWTjgWd58Ds0073Cf2ZHRH2 B+Eu97GHCn2cFBiaqcBUK4Tm6m/Aq97nFI4KDjbMaWkem+AuTBO7gBPNo9wHL2X0711B edBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NyOELBd+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m16-20020aa7c2d0000000b0046b2840ca3dsi10820771edp.474.2022.12.14.05.20.43; Wed, 14 Dec 2022 05:21:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NyOELBd+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S238562AbiLNNTC (ORCPT <rfc822;jeantsuru.cumc.mandola@gmail.com> + 99 others); Wed, 14 Dec 2022 08:19:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238426AbiLNNS4 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 14 Dec 2022 08:18:56 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63AAE205D8; Wed, 14 Dec 2022 05:18:55 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0085361A6D; Wed, 14 Dec 2022 13:18:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 47131C43392; Wed, 14 Dec 2022 13:18:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1671023934; bh=nnr17/76ojmrtu3Co48KLMzaUzbzMgFxhN+A+PvMGo0=; h=From:To:Cc:Subject:Date:From; b=NyOELBd+dxAFQUM7O4WYB2KKigLf2eAT/a8BJX4Tdh5YFIE9DYaLwK/Sp8M7AZOeH q4yfeUsevr3vxsCb2CHZcnMSUkbv2iVQKbH7LjRN32deVSK38gKnNetUQK0HrUHj/5 L96KPkyfAP3IaElm6AdKXwXQN9PZxw1RNA3ipDxG/WoX9vXGMAnMhq2Fc00XuAyFBK CjS+nsV8qVkdsi3ecIpiU4vcvFO7UjVnfxi0OcV1qx5sBDU4oRXVbaInmiptqk34gV Ixony2FmcWvUQUVXipx/YaWTlBXDBrV2VXiVy/O0Bf23I30eQ/jc4QTyeVuBTBEs9+ zKdT9GtSM/TPA== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from <johan+linaro@kernel.org>) id 1p5RfN-0000gG-Kq; Wed, 14 Dec 2022 14:19:22 +0100 From: Johan Hovold <johan+linaro@kernel.org> To: Daniel Lezcano <daniel.lezcano@linaro.org>, "Rafael J. Wysocki" <rafael@kernel.org> Cc: Amit Kucheria <amitk@kernel.org>, Thara Gopinath <thara.gopinath@gmail.com>, Andy Gross <agross@kernel.org>, Bjorn Andersson <andersson@kernel.org>, Konrad Dybcio <konrad.dybcio@linaro.org>, Zhang Rui <rui.zhang@intel.com>, Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>, Alim Akhtar <alim.akhtar@samsung.com>, Thierry Reding <thierry.reding@gmail.com>, Jonathan Hunter <jonathanh@nvidia.com>, Dmitry Baryshkov <dmitry.baryshkov@linaro.org>, linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-tegra@vger.kernel.org, Johan Hovold <johan+linaro@kernel.org> Subject: [PATCH 0/4] thermal: fix locking regressions in linux-next Date: Wed, 14 Dec 2022 14:16:13 +0100 Message-Id: <20221214131617.2447-1-johan+linaro@kernel.org> X-Mailer: git-send-email 2.37.4 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752195733244611198?= X-GMAIL-MSGID: =?utf-8?q?1752195733244611198?= |
Series |
thermal: fix locking regressions in linux-next
|
|
Message
Johan Hovold
Dec. 14, 2022, 1:16 p.m. UTC
This series fixes some of the fallout after the thermal changes that just landed in linux-next. Lockdep reported a lock inversion in one of the Qualcomm drivers and a closer review revealed that the changes had also broken the sysfs interface for at least three drivers. Note that a simple revert of the offending patches was not an option as some of the infrastructure that the old implementation relied on has also been removed. Johan Johan Hovold (4): thermal/drivers/qcom: fix set_trip_temp() deadlock thermal/drivers/exynos: fix set_trip_temp() deadlock thermal/drivers/tegra: fix set_trip_temp() deadlock thermal/drivers/qcom: fix lock inversion drivers/thermal/qcom/qcom-spmi-temp-alarm.c | 7 ++++++- drivers/thermal/samsung/exynos_tmu.c | 2 +- drivers/thermal/tegra/soctherm.c | 2 +- drivers/thermal/thermal_core.c | 1 + include/linux/thermal.h | 2 ++ 5 files changed, 11 insertions(+), 3 deletions(-)
Comments
On Wed, Dec 14, 2022 at 2:18 PM Johan Hovold <johan+linaro@kernel.org> wrote: > > This series fixes some of the fallout after the thermal changes that > just landed in linux-next. > > Lockdep reported a lock inversion in one of the Qualcomm drivers and a > closer review revealed that the changes had also broken the sysfs > interface for at least three drivers. > > Note that a simple revert of the offending patches was not an option as > some of the infrastructure that the old implementation relied on has > also been removed. I've dropped that material from my linux-next branch and Daniel, please also remove it from your branch that is pulled by linux-next so that it doesn't show up in there until 6.2-rc1 is out. It clearly is not ready for merging in its current form. It is still present in my bleeding-edge branch, though, so please apply the patches from Johan on top of it and send a new PR to me, so I can add it back to my linux-next branch once 6.2-rc1 appears. It would be good to check the code again too for any more similar fallout. Thanks!
On 14/12/2022 15:02, Rafael J. Wysocki wrote: > On Wed, Dec 14, 2022 at 2:18 PM Johan Hovold <johan+linaro@kernel.org> wrote: >> >> This series fixes some of the fallout after the thermal changes that >> just landed in linux-next. >> >> Lockdep reported a lock inversion in one of the Qualcomm drivers and a >> closer review revealed that the changes had also broken the sysfs >> interface for at least three drivers. >> >> Note that a simple revert of the offending patches was not an option as >> some of the infrastructure that the old implementation relied on has >> also been removed. > > I've dropped that material from my linux-next branch and Daniel, > please also remove it from your branch that is pulled by linux-next so > that it doesn't show up in there until 6.2-rc1 is out. > > It clearly is not ready for merging in its current form. I rebased a linux-next branch without the generic trip points rework. It can be inverted with the other changes without conflicts. I've pushed the branch in case you want to have a look. If you think it is acceptable in this form, I can send a tagged PR for 6.2-rc1 again. > It is still present in my bleeding-edge branch, though, so please > apply the patches from Johan on top of it and send a new PR to me, so > I can add it back to my linux-next branch once 6.2-rc1 appears. > > It would be good to check the code again too for any more similar fallout. I've been through already, the exynos fix is not necessary. But anyway, I agree we should keep these changes for the next release, it is better.
On Wed, Dec 14, 2022 at 03:37:43PM +0100, Daniel Lezcano wrote: > On 14/12/2022 15:02, Rafael J. Wysocki wrote: > > On Wed, Dec 14, 2022 at 2:18 PM Johan Hovold <johan+linaro@kernel.org> wrote: > >> > >> This series fixes some of the fallout after the thermal changes that > >> just landed in linux-next. > >> > >> Lockdep reported a lock inversion in one of the Qualcomm drivers and a > >> closer review revealed that the changes had also broken the sysfs > >> interface for at least three drivers. > > It is still present in my bleeding-edge branch, though, so please > > apply the patches from Johan on top of it and send a new PR to me, so > > I can add it back to my linux-next branch once 6.2-rc1 appears. > > > > It would be good to check the code again too for any more similar fallout. > > I've been through already, the exynos fix is not necessary. Right, I failed to notice that tmu_set_trip_temp() was not actually a thermal_zone_device_ops callback. So that one can be dropped. Johan
On Wed, Dec 14, 2022 at 3:37 PM Daniel Lezcano <daniel.lezcano@linaro.org> wrote: > > On 14/12/2022 15:02, Rafael J. Wysocki wrote: > > On Wed, Dec 14, 2022 at 2:18 PM Johan Hovold <johan+linaro@kernel.org> wrote: > >> > >> This series fixes some of the fallout after the thermal changes that > >> just landed in linux-next. > >> > >> Lockdep reported a lock inversion in one of the Qualcomm drivers and a > >> closer review revealed that the changes had also broken the sysfs > >> interface for at least three drivers. > >> > >> Note that a simple revert of the offending patches was not an option as > >> some of the infrastructure that the old implementation relied on has > >> also been removed. > > > > I've dropped that material from my linux-next branch and Daniel, > > please also remove it from your branch that is pulled by linux-next so > > that it doesn't show up in there until 6.2-rc1 is out. > > > > It clearly is not ready for merging in its current form. > > I rebased a linux-next branch without the generic trip points rework. Thanks! > It can be inverted with the other changes without conflicts. Sounds good. > I've pushed the branch in case you want to have a look. If you think it > is acceptable in this form, I can send a tagged PR for 6.2-rc1 again. It looks OK, so please send a PR. > > It is still present in my bleeding-edge branch, though, so please > > apply the patches from Johan on top of it and send a new PR to me, so > > I can add it back to my linux-next branch once 6.2-rc1 appears. > > > > It would be good to check the code again too for any more similar fallout. > > I've been through already, the exynos fix is not necessary. But anyway, > I agree we should keep these changes for the next release, it is better. Awesome, thanks!
Hi Johan, thanks for your fixes On 14/12/2022 14:16, Johan Hovold wrote: > This series fixes some of the fallout after the thermal changes that > just landed in linux-next. > > Lockdep reported a lock inversion in one of the Qualcomm drivers and a > closer review revealed that the changes had also broken the sysfs > interface for at least three drivers. > > Note that a simple revert of the offending patches was not an option as > some of the infrastructure that the old implementation relied on has > also been removed. > > Johan > > > Johan Hovold (4): > thermal/drivers/qcom: fix set_trip_temp() deadlock > thermal/drivers/exynos: fix set_trip_temp() deadlock > thermal/drivers/tegra: fix set_trip_temp() deadlock > thermal/drivers/qcom: fix lock inversion > > drivers/thermal/qcom/qcom-spmi-temp-alarm.c | 7 ++++++- > drivers/thermal/samsung/exynos_tmu.c | 2 +- > drivers/thermal/tegra/soctherm.c | 2 +- > drivers/thermal/thermal_core.c | 1 + > include/linux/thermal.h | 2 ++ > 5 files changed, 11 insertions(+), 3 deletions(-) >