Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1836180rwb; Wed, 5 Oct 2022 05:39:28 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5CQPXI6RGL5EUDvIBHswOtv6EMCJE+PV/4PmS98hY86Hgw+qrFwyC+Bnc/Qx/bNE7K1D3a X-Received: by 2002:a63:d241:0:b0:43c:474c:c6c6 with SMTP id t1-20020a63d241000000b0043c474cc6c6mr27561141pgi.523.1664973568309; Wed, 05 Oct 2022 05:39:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664973568; cv=none; d=google.com; s=arc-20160816; b=vYhu6mDcBEQF5d81YcunxQvU07ptni8azcqf7PwENn9e6I2GmRbgb9NiLAyfK/e9sU U1OKb1a3BshKjUMDmqjMUvgFM9uiQQ0nZewuRpaCL8lsM0jG0qqdb4jgnNYs46uOPVxG J7Pclw/LGQQMOKKrXTYFMoCyTVrBmvyO01SSwBoHqoLGnxSn4ZRs1l+bn3fxUNlcCake x6lYsyqALyLlsFyu2YYMrERgFSyQejv3MEvM+RX8TQlTu3LuYA2wihAPMHPcau/9y6Pr T3HoVP65KXVGTELcnhULqaTRJyjjSvDzMNtWQRE1CCI8YRO1oQYtSzx2sQ63A9TH69IL odKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=KTX8CzjgT3X/t2r5vWkkyRPC+B6Zpur5yx6z33EALmI=; b=dVzM2Y8YQDremrIa9mXtVSyfDijg9GU1LEjKnaVltJLGxWdRpvnREnDePPlIlvsXL2 SCR7E+SZI9YLpFfotd0go9+3maPx9cT/C0KsfaB8EZDXyyXJ59uPb/PXy77Xty0qdqYc GYKjOUDTOg/YMVe8iWgtMYoit0zZSOOw5UcbdWScqqrfxXjEUP6xhzfpNdBplNS69vaP Ud8hYdkqpn93f3syaKRuHbyvwWIpIuN1WYB0tKCuJYbWbVeForQhIZSNLhgr99XfkAVo GDB/Dv5KDkmo8S9m3s94H4pBiCbVxggOSPzJCPRTVuKB5QQ4SO+14/4g3Ii+GxlbeMeN Ubsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dzsfAxgd; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jx5-20020a17090b46c500b0020ac64a52c0si1739602pjb.47.2022.10.05.05.39.11; Wed, 05 Oct 2022 05:39:28 -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=@linaro.org header.s=google header.b=dzsfAxgd; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229450AbiJEMhY (ORCPT + 99 others); Wed, 5 Oct 2022 08:37:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229653AbiJEMhV (ORCPT ); Wed, 5 Oct 2022 08:37:21 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E60125789F for ; Wed, 5 Oct 2022 05:37:18 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id u10so25646690wrq.2 for ; Wed, 05 Oct 2022 05:37:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:references:cc:to:from :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=KTX8CzjgT3X/t2r5vWkkyRPC+B6Zpur5yx6z33EALmI=; b=dzsfAxgdAGlUvKVUY6p3V8qGo313WeGugAOXWZSt+1fBP2srisSYreLvsC4Jt8R7vI 6CCNZ2KSUzFipf2TUazEUfYo06vjjv91Xy+qnqqccv6JnCX5hNP31NA70WmGp0Yy32QP mExqi6cWI3IjFT/cgE6UfcZSCVhbtLcSJWWwIhNYbOhV6a1O9pc8mtgsF6so8OABSDbC Zz/V8dDJJNEFO8LSd3y5bD7HlZgjLbp0vYE7xf1uhZtqnOrcZuofQtpcfMuSMNNg7ivk kfkIb4D7afc9KH4Wn9yfjJvGbhkNxbmLo2OKigcWEZvHo4LzCO3D1KBst2Iy2FRzztXS ++rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:references:cc:to:from :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=KTX8CzjgT3X/t2r5vWkkyRPC+B6Zpur5yx6z33EALmI=; b=1og9D/sVG8wVgfZesmNXjuCvqtnPbKIBsaMJLYbEgetf6J5NBHt3r1RSFvUl0gOJJw EYOzFP0drfrdFirh16dBqTJtc700c8KO2aBOWk4Bf9pMVhbctt1EAM4Cen5VvDXBZYo1 G7fswZDo9R74zwOkxQ84yAoEflZyj8b/AzGdQORoTaV6tLu0ON/p8wAr5earZWj0ZpHH BCxE2uoTgFBmupfoDcrTd18WibMzzDlYDfStXNMgvpZhcrC/GHr8R8vKilnqqHBdieiR 5HnZ0uqnBD0L9o0mlxWpHLIz4d60DyLtdW5KqVQTyqDt06M1OvVqcQKNMQ6wz1W7Pv08 7CDw== X-Gm-Message-State: ACrzQf3PeC9tCbSosNRjQGYBXcnovyEbnEruG7gzbkhaPS5G019khtr+ akWOVchtBBWbNg6KtB6/7btjiA== X-Received: by 2002:a5d:5983:0:b0:22c:b9a0:e874 with SMTP id n3-20020a5d5983000000b0022cb9a0e874mr19860166wri.306.1664973437294; Wed, 05 Oct 2022 05:37:17 -0700 (PDT) Received: from ?IPV6:2a05:6e02:1041:c10:ffcf:b5a4:bbee:42a5? ([2a05:6e02:1041:c10:ffcf:b5a4:bbee:42a5]) by smtp.googlemail.com with ESMTPSA id f18-20020a05600c4e9200b003b492b30822sm2031325wmq.2.2022.10.05.05.37.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 05 Oct 2022 05:37:16 -0700 (PDT) Message-ID: <851008bf-145d-224c-87a8-cb6ec1e9addb@linaro.org> Date: Wed, 5 Oct 2022 14:37:14 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v8 00/29] Rework the trip points creation Content-Language: en-US From: Daniel Lezcano To: Marek Szyprowski Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, rui.zhang@intel.com, Broadcom Kernel Team , Support Opensource , Pengutronix Kernel Team , NXP Linux Team , Andy Gross , Bartlomiej Zolnierkiewicz , Krzysztof Kozlowski , Alim Akhtar , netdev@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org, linux-omap@vger.kernel.org, rafael@kernel.org References: <20221003092602.1323944-1-daniel.lezcano@linaro.org> <8cdd1927-da38-c23e-fa75-384694724b1c@samsung.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 Hi Marek, On 03/10/2022 23:18, Daniel Lezcano wrote: [ ... ] >> I've tested this v8 patchset after fixing the issue with Exynos TMU with >> https://lore.kernel.org/all/20221003132943.1383065-1-daniel.lezcano@linaro.org/ >> >> patch and I got the following lockdep warning on all Exynos-based boards: >> >> >> ====================================================== >> WARNING: possible circular locking dependency detected >> 6.0.0-rc1-00083-ge5c9d117223e #12945 Not tainted >> ------------------------------------------------------ >> swapper/0/1 is trying to acquire lock: >> c1ce66b0 (&data->lock#2){+.+.}-{3:3}, at: exynos_get_temp+0x3c/0xc8 >> >> but task is already holding lock: >> c2979b94 (&tz->lock){+.+.}-{3:3}, at: >> thermal_zone_device_update.part.0+0x3c/0x528 >> >> which lock already depends on the new lock. > > I'm wondering if the problem is not already there and related to > data->lock ... > > Doesn't the thermal zone lock already prevent racy access to the data > structure? > > Another question: if the sensor clock is disabled after reading it, how > does the hardware update the temperature and detect the programed > threshold is crossed? just a gentle ping, as the fix will depend on your answer ;) Thanks -- D. [ ... ] -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog