Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1973816pxb; Mon, 23 Aug 2021 08:59:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfJCanJ9Q+6T7F/a4tQCWWHQBrZ3QCCsNM3QQb4zSBF0LdyE6ru9oFdWkk4Y7IlVCIytpf X-Received: by 2002:aa7:d147:: with SMTP id r7mr37755817edo.148.1629734374256; Mon, 23 Aug 2021 08:59:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629734374; cv=none; d=google.com; s=arc-20160816; b=MXUlETy5QjK4uZ0mCUTDGKnLcW0bJgCmFzLpoECGo+TwlGkiwhXGL8LbsKd5hjoMJg oQ0eZzLj54zkEw7bLR/Qr4ta2mVQTrwzd7wNWxakguotFktU/euHSj/hzOeGmfbd9lOW kxUxuP/EJfC+mzFGcPEKsct1h018lxbocAa/ZTjZvnGJVRTk0BqRMmNc8NxZQSL50a4x eEvJqSwYswOQ/BogFKdQ6uFmcxC+XsNSIXq7PUBDXjcPqmnP27PQbVTeXCyO6O/eFFMA w2cueTXSYcm6SDH72UUtO59HevVuApqR8+Xg71Db4E5TbTHX+PH1qr2JB6esav/apXg8 k67w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=+FLR6Z8/mDAczEMpEGS5kn4L3ds8qzE/r6tJ5Ts7c48=; b=TKzgmt1NPWkteA4B6ZeiOCg7j/CT0tJyMdNrHMdWFhTKLIFt4dX1phXg6xQeXyGggX +tjFiYhySL8q1Vw7zZONQ2oHiwAmMoxECOgeC1Mblw8s5C3gv9OdUaHHKKKld1gZxZqO 7DsJgP98XzvcjQLcMMwT4HHq3ustAOb/oiwCbVnQHtq5X7MbYq6hxGYuG8npVlVJlA2A ctSvpFE0ave6ceqpDS64ZmuaRBylSOtccE78yF8BOgXuFaFqag5HMqAUk0L2Ql6HR59e 3pHYe4BZlAmCV+9SQp/XRry+v+RvciI8fBBW3Br+GUXYYDcXe7ULIC8/+0cMZ2v3GukR lGvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="RgMiY/yz"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l3si17559559ejd.203.2021.08.23.08.59.09; Mon, 23 Aug 2021 08:59:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="RgMiY/yz"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S231574AbhHWP5u (ORCPT + 99 others); Mon, 23 Aug 2021 11:57:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231673AbhHWP5s (ORCPT ); Mon, 23 Aug 2021 11:57:48 -0400 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0FDBC061760 for ; Mon, 23 Aug 2021 08:57:05 -0700 (PDT) Received: by mail-wr1-x42a.google.com with SMTP id d26so6624876wrc.0 for ; Mon, 23 Aug 2021 08:57:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=+FLR6Z8/mDAczEMpEGS5kn4L3ds8qzE/r6tJ5Ts7c48=; b=RgMiY/yz7J1NIo6n25Nsp/G0+34xdlTC3cItRtlYPa5bZ1YMR3QsyZtfgDApkvKKG4 OXPmDfUltBnNGrqmrFGseDz0DsKEHVtlkzkSHzjI1NeW+8rDSs5Tmz5qCiXxmoXYi++C NNc6+hphK7QoqfYfqR9IP6jdk/59R43qtx54hCpp/gQ1KfIwqOS3SuHG9CTR2uByFY9N Jwdvjsg7CJw95V/+2kONM0jr0T0qj6NJx2a6NAqZbtrHWuLnMFNYvZj/3T7a4tYtpwXE lueV9Qy0/cRwZDDrYlxtgKoiUBO/1UuYxsStc/+BeADJWbznQ5f6qke+iS/aFBUrOFTd 5kIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=+FLR6Z8/mDAczEMpEGS5kn4L3ds8qzE/r6tJ5Ts7c48=; b=Ok4uB4j9+k9LFzuJI1Ipu58W/TDmuqWp8K+KHaZ6kr65Dc44CMfRkCQDQWNSryP1xu C13HuhElaIxUrDxB5zXHwcHmuHLCyRHVNFb1H4FNlm3cCeyVQbB+yuFETJ8gKhlj+eNg BaymnUUwbojjrIHXQi+fP3PTpAcvdbliNS/ZksJAtBS/IaEX8atLZJg2xeKrl/x9Zxv+ EC8T324Qwg+2ePwkLfQHqBQsgWPIL/WwvADXM7FJc5ZMwscQ3hYT5EyftUUyeGqfQb3i E+YTcaz/Acq5XKuF1ZPtUbgSB1E0QKL8YmC3KqkaHpo6qRoVaQ0jMzSiq1I86z28FRhI WZbg== X-Gm-Message-State: AOAM5327IzMoVGKyoyIT7Mm109i4ZRxzdKHXhxkkVD9WjLIJVdFns6iw gdlRLUszg+r2y2kvc8wCzwwdUA== X-Received: by 2002:adf:dcc5:: with SMTP id x5mr14267099wrm.385.1629734224261; Mon, 23 Aug 2021 08:57:04 -0700 (PDT) Received: from ?IPv6:2a01:e34:ed2f:f020:fe2d:133f:1574:bbe? ([2a01:e34:ed2f:f020:fe2d:133f:1574:bbe]) by smtp.googlemail.com with ESMTPSA id l2sm15100915wrx.2.2021.08.23.08.57.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 23 Aug 2021 08:57:03 -0700 (PDT) Subject: Re: [Patch v5 2/6] thermal: qcom: Add support for LMh driver To: Bjorn Andersson Cc: Thara Gopinath , agross@kernel.org, rui.zhang@intel.com, viresh.kumar@linaro.org, rjw@rjwysocki.net, robh+dt@kernel.org, steev@kali.org, tdas@codeaurora.org, mka@chromium.org, linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org References: <20210809191605.3742979-1-thara.gopinath@linaro.org> <20210809191605.3742979-3-thara.gopinath@linaro.org> From: Daniel Lezcano Message-ID: Date: Mon, 23 Aug 2021 17:57:02 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Bjorn, On 23/08/2021 17:05, Bjorn Andersson wrote: > On Sat 21 Aug 02:41 PDT 2021, Daniel Lezcano wrote: > >> >> Hi Thara, >> >> On 09/08/2021 21:16, Thara Gopinath wrote: >>> Driver enabling various pieces of Limits Management Hardware(LMh) for cpu >>> cluster0 and cpu cluster1 namely kick starting monitoring of temperature, >>> current, battery current violations, enabling reliability algorithm and >>> setting up various temperature limits. >>> >>> The following has been explained in the cover letter. I am including this >>> here so that this remains in the commit message as well. >>> >>> LMh is a hardware infrastructure on some Qualcomm SoCs that can enforce >>> temperature and current limits as programmed by software for certain IPs >>> like CPU. On many newer LMh is configured by firmware/TZ and no programming >>> is needed from the kernel side. But on certain SoCs like sdm845 the >>> firmware does not do a complete programming of the h/w. On such soc's >>> kernel software has to explicitly set up the temperature limits and turn on >>> various monitoring and enforcing algorithms on the hardware. >>> >>> Tested-by: Steev Klimaszewski # Lenovo Yoga C630 >>> Signed-off-by: Thara Gopinath >> >> Is it possible to have an option to disable/enable the LMh driver at >> runtime, for instance with a module parameter ? >> > > Are you referring to being able to disable the hardware throttling, or > the driver's changes to thermal pressure? The former. > I'm not aware of any way to disable the hardware. I do remember that > there was some experiments done (with a hacked up boot chain) early on > and iirc it was concluded that it's not a good idea. My objective was to test the board with the thermal framework handling the mitigation instead of the hardware. I guess I can set the hardware temperature higher than the thermal zone temperature. On which sensor the lmh does refer to ? The cluster one ? (by the way the thermal zone temperatures per core are lower by 5°C than the hardware mitigation ? is it done on purpose ?) > Either way, if there is a way and there is a use for it, we can always > add such parameter incrementally. So I suggest that we merge this as is. Yes, that was for my information. It is already merged. Thanks -- Daniel -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog