Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp1128043rwo; Sat, 22 Jul 2023 07:07:12 -0700 (PDT) X-Google-Smtp-Source: APBJJlGMWzWpXRCVrxJ3u2CW+7CX+Yoo3Ka7u7KruzBxCfGpbF/84O0A0tQZfyLVW2SMvGzyVF/I X-Received: by 2002:a05:6a20:1602:b0:133:2fb2:917d with SMTP id l2-20020a056a20160200b001332fb2917dmr5532516pzj.5.1690034832563; Sat, 22 Jul 2023 07:07:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690034832; cv=pass; d=google.com; s=arc-20160816; b=i3L5yHePYRymIjvKL+LTJN8OOIDo9gQX9b6PcC6LioKZdT1x9urhPZ/seD1hIu+S2z FSkGbpgqN1qxsf7cbt0ulNqo2rGFj2KmDhN/1oIHhoM5maQWxRgzRiOZUXRtNtpz4OUp Ymdfak9opAsDQKCFJVn7n09e131INQXoPAFiVBirv9ocrpp/6KFXXPxkGdsPGgY73dg+ M7HHvcfO2uiB7pk2gmi7vtmyTUFicFp7mdnMeD6Kl4BvyB08E476h7t8BKzFCs3gkFRO 6h0e4wr+heZouYsPq0yS5UiJNCGKySQ9EKJLj3V7Ufrd71v0OXOm/rBpVBtCkIU0FGhp notA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:organization:references:in-reply-to:date :cc:to:from:subject:message-id:dkim-signature; bh=/q5vPysvgwOOLB/JiDSQP3eCYUz8RtczsHjvgeJg1Gk=; fh=88Wc7N9lk7MvVJQRdjBZta/EdFNv1m2i821dxsXGs3g=; b=KQDqCII31JFGmG3t9MayVLqlOdVsjWgmPJ5V2vP1hGXOfZUjfkq1mClF6zv4nvPr1k vI3DX4QgqoLmZj4hdkTACRTb4EulR6xU44Ti2MvE8MHbCnBPNoCzVRnope9+5fLBZC2q 4lpQX2R5j2WMOOhuOcyj19jez1Mh3oBmSHCNCX+RJ/1uhPLr/JY/blu5j2pat8KINUi5 qtRXqQlZPA/GbBmLzDi7DLZJ5TUmrHjC+4PssTmY3N8vDGGVW9o92YuqpilZVTFwEpOk QqPM7h1slwaKYDwWCj7pMifcSEwnRnRg9XgkDemDMa1fDg7QhIJtXNUao1Lk+j8ip2o+ aiOA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@icenowy.me header.s=zmail2 header.b=APWVV1qo; arc=pass (i=1 spf=pass spfdomain=icenowy.me dkim=pass dkdomain=icenowy.me dmarc=pass fromdomain=icenowy.me>); 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=icenowy.me Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k6-20020a6555c6000000b0053416d0b54dsi5270690pgs.518.2023.07.22.07.06.50; Sat, 22 Jul 2023 07:07:12 -0700 (PDT) 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=@icenowy.me header.s=zmail2 header.b=APWVV1qo; arc=pass (i=1 spf=pass spfdomain=icenowy.me dkim=pass dkdomain=icenowy.me dmarc=pass fromdomain=icenowy.me>); 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=icenowy.me Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230147AbjGVMOQ (ORCPT + 99 others); Sat, 22 Jul 2023 08:14:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229553AbjGVMOP (ORCPT ); Sat, 22 Jul 2023 08:14:15 -0400 Received: from sender4-op-o15.zoho.com (sender4-op-o15.zoho.com [136.143.188.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8CFD09B; Sat, 22 Jul 2023 05:14:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690028033; cv=none; d=zohomail.com; s=zohoarc; b=K9sEHU0nSLpZWOtlzt7nIwZkjo+ZUtg78DQ/J4Yvi1oWAF6zUNIVnrePOCeid8205wlTCAvuMFQpdmN9dGgqaRpA7+JtelbeHK5jLr6tdaZIrugwvWBWEJuHxL4B8cY2s4LDPU5w/b09PYsRXwNXEUeY2Qyq3P151V3NyyVznhQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1690028033; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=/q5vPysvgwOOLB/JiDSQP3eCYUz8RtczsHjvgeJg1Gk=; b=NqlQ4pNMTfCJryi0iHfTEu26624SDvrEBlEzAgkVxRvRNGyIN2C2M7QyBA5HRMEiAInmnOLXehEd8QYRHWyMCPUwZfgPL+NVU2dbqi2CRFFoEbazHbARx0eCuYorCv86YeKJj2XiaxmFr/mucSGvn5SA06aal3skpuR5BYCwre4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=icenowy.me; spf=pass smtp.mailfrom=uwu@icenowy.me; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1690028033; s=zmail2; d=icenowy.me; i=uwu@icenowy.me; h=Message-ID:Subject:Subject:From:From:To:To:Cc:Cc:Date:Date:In-Reply-To:References:Content-Type:Content-Transfer-Encoding:MIME-Version:Message-Id:Reply-To; bh=/q5vPysvgwOOLB/JiDSQP3eCYUz8RtczsHjvgeJg1Gk=; b=APWVV1qoE4xWaSouk8cls37oMN6w/9JdpLHTEFaWangCnhDpkFSo1uUGxs/P/F2j a0Oh5SgwYVvRcWeHgZvSTCoxeHf/6Bxx/iQnLPO4Ur/JaDP8rOCpXmtjajkNPn9yNre djLfjJUmLHWqSrqrFZcPiJ+4O6jkOzMAjyctQHynimWoAsULuj288qDmpjeco4pTlaX egrpK2+0KvycN9jDJ1Qf8qWUBfXbea1zw6lwKxqZ1v8/qkPsYk+vLjU9kR9mondBRYl O4M3Mf9R6+eELzTC3U0wWneA2hRAyruPPQNNV8PSMCvNWwbvbCXtwL9cCZabWbZj9zY qsa7kpGdCA== Received: from edelgard.fodlan.icenowy.me (120.85.97.227 [120.85.97.227]) by mx.zohomail.com with SMTPS id 1690028030544550.8527003226176; Sat, 22 Jul 2023 05:13:50 -0700 (PDT) Message-ID: <05e6d2d6dd8805c4cded28f85ac873b96bc1467e.camel@icenowy.me> Subject: Re: [PATCH 0/2] thermal/drivers/mediatek: fix a regression affecting other subsystems From: Icenowy Zheng To: Daniel Lezcano , "Rafael J . Wysocki" , Amit Kucheria , Zhang Rui , Matthias Brugger , AngeloGioacchino Del Regno , Kang Chen , Dongliang Mu Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Date: Sat, 22 Jul 2023 20:13:45 +0800 In-Reply-To: <40546a57-27ac-8bf9-a2d8-77f7d4ab4aad@linaro.org> References: <20230529162056.3786301-1-uwu@icenowy.me> <40546a57-27ac-8bf9-a2d8-77f7d4ab4aad@linaro.org> Organization: Anthon Open-Source Community Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4 MIME-Version: 1.0 X-ZohoMailClient: External X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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: X-Mailing-List: linux-kernel@vger.kernel.org =E5=9C=A8 2023-06-13=E6=98=9F=E6=9C=9F=E4=BA=8C=E7=9A=84 10:44 +0200=EF=BC= =8CDaniel Lezcano=E5=86=99=E9=81=93=EF=BC=9A > On 29/05/2023 18:20, Icenowy Zheng wrote: > > In the commit I reverted as the first commit of this patchset, the > > of_iomap function call, which allows multiple mapping of the same > > physical memory space, is replaced to calling devm_of_iomap, which > > registers exclusivity, and on my system (mt8173-elm), preventing > > display > > from working. > >=20 > > So I reverted it, and to really solve the problem that the original > > commit wants to solve, I read the source of auxadc-thermal and > > realized > > that the address of these two memory blocks are not saved after > > probe, > > and they're only used when initializing the thermal sensors. This > > leads > > to my final fix, which is the second commit here, that adds > > of_iounmap > > just to the probe function. > >=20 > > Icenowy Zheng (2): > > =C2=A0=C2=A0 Revert "thermal/drivers/mediatek: Use devm_of_iomap to avo= id > > resource > > =C2=A0=C2=A0=C2=A0=C2=A0 leak in mtk_thermal_probe" > > =C2=A0=C2=A0 thermal/drivers/mediatek: unmap foreign MMIO after probing > >=20 > > =C2=A0 drivers/thermal/mediatek/auxadc_thermal.c | 46 ++++++++++++-----= - > > ----- > > =C2=A0 1 file changed, 24 insertions(+), 22 deletions(-) >=20 > I'll apply only the revert and let you revisit the patch 2 which > could=20 > be improved. Sorry, is the first patch applied? I didn't see it in any kernel trees... I have no current idea about how to fix in patch 2. >=20