lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f415a8cd-4cae-d7c3-60fc-674b3e660f6b@quicinc.com>
Date: Wed, 24 Jan 2024 16:12:46 +0530
From: Priyansh Jain <quic_priyjain@...cinc.com>
To: Konrad Dybcio <konrad.dybcio@...aro.org>,
        Amit Kucheria
	<amitk@...nel.org>,
        Thara Gopinath <thara.gopinath@...il.com>,
        "Bjorn
 Andersson" <andersson@...nel.org>,
        "Rafael J . Wysocki" <rafael@...nel.org>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        Zhang Rui <rui.zhang@...el.com>, Lukasz Luba <lukasz.luba@....com>,
        <linux-pm@...r.kernel.org>, <linux-arm-msm@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
CC: <quic_manafm@...cinc.com>
Subject: Re: [PATCH] thermal/drivers/tsens: Add suspend to RAM support for
 tsens



On 1/22/2024 8:02 PM, Konrad Dybcio wrote:
> On 22.01.2024 11:07, Priyansh Jain wrote:
>> Add suspend callback support for tsens which disables tsens interrupts
>> in suspend to RAM callback.
> 
> Would it not be preferrable to have the "critical overheat", wakeup-
> capable interrupts be enabled, even if the system is suspended?
> 


As part of suspend to RAM, tsens hardware will be turned off and it 
cannot generate any interrupt.Also system doesn't want to abort suspend 
to RAM due to tsens interrupts since system is already going into lowest
power state. Hence disabling tsens interrupt during suspend to RAM callback.

Regards,
Priyansh

>> Add resume callback support for tsens which reinitializes tsens hardware
>> and enables back tsens interrupts in resume callback.
>>
>> Signed-off-by: Priyansh Jain <quic_priyjain@...cinc.com>
>> ---
> 
> [...]
> 
> 
>> +
>> +int tsens_suspend_common(struct tsens_priv *priv)
>> +{
>> +	switch (pm_suspend_target_state) {
>> +	case PM_SUSPEND_MEM:
>> +		if (priv->combo_irq > 0) {
>> +			disable_irq_nosync(priv->combo_irq);
>> +			disable_irq_wake(priv->combo_irq);
>> +		}
>> +
>> +		if (priv->uplow_irq > 0) {
>> +			disable_irq_nosync(priv->uplow_irq);
>> +			disable_irq_wake(priv->uplow_irq);
>> +		}
>> +
>> +		if (priv->crit_irq > 0) {
>> +			disable_irq_nosync(priv->crit_irq);
>> +			disable_irq_wake(priv->crit_irq);
>> +		}
>> +		break;
>> +	default:
>> +		break;
>> +	}
> 
> if (pm_suspend_target_state != PM_SUSPEND_MEM)
> 	return 0;
> 
> <rest of the code>
> 
> [...]
> 
>>   
>> +	/* For saving irq number to re-use later */
> 
> This is rather self-explanatory
> 
> Konrad

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ