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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81FB6C43219 for ; Wed, 5 Oct 2022 12:37:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229567AbiJEMhW (ORCPT ); Wed, 5 Oct 2022 08:37:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229673AbiJEMhV (ORCPT ); Wed, 5 Oct 2022 08:37:21 -0400 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5A8D5788D for ; Wed, 5 Oct 2022 05:37:18 -0700 (PDT) Received: by mail-wr1-x42b.google.com with SMTP id a10so13425882wrm.12 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=dhQm2Mi4e7T8wGxTWY4Qh8MF2/r5A40fHoytn3qrHFPhCxO9uz+JJPu+yVG9qatYuo Xh3rWcuby2m9ClX8SoZ+cRcGD7ywP+QeQoAy1Lkn+Jgy4iOqr/TqL2tOhKB5G7DQ0/PN LrhCXfByqKxCgkclssSqEPHojl+1SdfHbzDkBR2v2L3Tq5kGk8w4tqFxCUvKF50ejR9b 0WekogRLbDsezjf7j7S/KKXCJfoK4jFL8vi86LOU87bTGTa2Xfr9Yw3xD08a+zWagWR9 xuh+3DtfG1H7sAZabnxdakxtc7J4Emk8XFL+vg3g1EZq8TVKjyQ32DZYRDz/E0tSDdjr NDAg== X-Gm-Message-State: ACrzQf1sNDBBsZ0XDVrMoSTUOUofX3LNHnkVg9eBhvjHvg6jW4jAL5CA JCgbXn7By7aFcLldTJdNKv2DBg== X-Google-Smtp-Source: AMsMyM6Jlg5EJX8UPumAZ9rKA8q/8S24FJ3Uw0SxmI6WuaZGcUfDRQsK4mhRcGoSkeMPVSiGBC98sw== 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 Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@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