mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Gaurav Kohli <gaurav.kohli@oss.qualcomm.com>
To: Abel Vesa <abel.vesa@oss.qualcomm.com>
Cc: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Abel Vesa <abelvesa@kernel.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arm64: dts: qcom: shikra: Drop CPU critical trips
Date: Thu, 22 Oct 2026 22:28:42 +0530	[thread overview]
Message-ID: <d8dc2c6f-9b1e-4248-b81b-cbbd524233d7@oss.qualcomm.com> (raw)
In-Reply-To: <crcwoq7atn7pkwt7cryixquqydyxtqezphq4cpq3cokxuxmkcu@axzmbxzf2mwg>



On 10/21/2026 5:36 PM, Abel Vesa wrote:
> On 26-10-21 17:12:11, Gaurav Kohli wrote:
>>
>>
>> On 10/20/2026 6:26 PM, Abel Vesa wrote:
>>> On 26-10-19 20:03:47, Gaurav Kohli wrote:
>>>>
>>>>
>>>> On 10/15/2026 4:43 PM, Konrad Dybcio wrote:
>>>>> On 9/25/26 12:24 PM, Gaurav Kohli wrote:
>>>>>>
>>>>>>
>>>>>> On 9/25/2026 3:13 PM, Abel Vesa wrote:
>>>>>>> On 26-09-24 19:52:32, Gaurav Kohli wrote:
>>>>>>>> Shikra firmware handles CPU thermal mitigation up to 117 C, while
>>>>>>>> Linux CPU critical trips trigger at 115 C. This can shut the system
>>>>>>>> down before firmware reaches the end of its mitigation range.
>>>>>>>>
>>>>>>>> Drop the critical trips from the CPU thermal zones and leave the hot
>>>>>>>> trips, non-CPU critical trips and GPUSS passive cooling map unchanged.
>>>>>>>
>>>>>>> I thought that was the whole point of having the critical trips set to
>>>>>>> 115 C, so that the kernel can gracefully shut down before firmware cuts
>>>>>>> it off.
>>>>>>>
>>>>>>> What happens if CPU gets to 117 C and the critical trips are removed?
>>>>>>> How will firmware thermal mitigation handle it?
>>>>>>
>>>>>> Thanks Abel for review.
>>>>>>
>>>>>> For the CPU thermal zones on this SoC, hardware-side mitigation is already available at 115 C and 117 C, and hardware shutdown is at 120 C. Because of that, a Linux critical trip at 115 C is not very useful. It overlaps with the hardware mitigation range and can trigger shutdown before the firmware thermal sequence has completed.
>>>>>
>>>>> Does the hardware mitigation just pull the plug, or does it signal
>>>>> to the OS that it's about to? We absolutely need the OS to be aware,
>>>>> so that e.g. the filesystem will be synced.
>>>>
>>>> Thanks Konrad for the review.
>>>>
>>>> The OS is not notified before the final HW shutdown at 120 C. There is also
>>>> no useful margin for a Linux critical trip here, firmware/HW mitigation
>>>> starts at 115/117 C and hw shutdown is at 120.
>>>>
>>>> So 115 C overlaps with firmware mitigation, while placing it higher is
>>>> too close to HW shutdown to be useful.
>>>
>>> But having the 115 C one will allow the kernel to take all the necessary
>>> steps to bring the system down gracefully, while relying solely on the
>>> firmware will just kill the system before kernel can do anything.
>>
>> Thanks Abel for the review.
>>
>> On this target, 115/117 C firmware mitigation is throttling/prevention, not
>> shutdown. The final HW shutdown threshold is 120 C.
>>
>> The 115 C Linux critical trip therefore starts shutdown exactly when
>> firmware mitigation begins. Moving it higher also leaves too little margin
>> before 120 C.
>>
>> So this patch drops only the CPU critical trips. Would you prefer keeping a
>> Linux critical trip at 118 C ?
> 
> Yes. Again, we don't want the firmware to crash the system before kernel
> has a chance to bring it down gracefully.

Sure, will add at 118.

> 
> But how does the firmware mitigation (throttling/prevention) is done?
> Shouldn't kernel be aware of such thing ?

LMH hardware handles the CPU frequency throttling. The kernel is aware 
of LMH events through the cpufreq driver’s interrupt/polling
path.


thanks
Gaurav


      reply	other threads:[~2026-10-22 16:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-24 14:22 Gaurav Kohli
2026-09-25  9:43 ` Abel Vesa
2026-09-25 10:24   ` Gaurav Kohli
2026-10-15 11:13     ` Konrad Dybcio
2026-10-19 14:33       ` Gaurav Kohli
2026-10-20 12:56         ` Abel Vesa
2026-10-21 11:42           ` Gaurav Kohli
2026-10-21 12:06             ` Abel Vesa
2026-10-22 16:58               ` Gaurav Kohli [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d8dc2c6f-9b1e-4248-b81b-cbbd524233d7@oss.qualcomm.com \
    --to=gaurav.kohli@oss.qualcomm.com \
    --cc=abel.vesa@oss.qualcomm.com \
    --cc=abelvesa@kernel.org \
    --cc=andersson@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®