Re: [PATCH v4 2/4] PM / QoS: add lockless read for flags
From: Kendall Willis
Date: Tue Aug 25 2026 - 12:22:34 EST
On 10:08-20260819, Kevin Hilman (TI) wrote:
> Add a lockless read for QoS flags similar to the lockless read for
> resume latency (dev_pm_qos_raw_resume_latency) which may be called
> from atomic context (e.g. genpd governors running under a raw spinlock
> or in the syscore suspend path), where taking that sleeping lock would
> be invalid on PREEMPT_RT.
>
> dev_pm_qos_raw_flags() now reads dev->power.qos->flags.effective_flags
> with READ_ONCE() so also add corresponding WRITE_ONCE() to the two
> effective_flags writes, the same way pm_qos_set_value() already does
> for target_value/pm_qos_read_value().
>
> Signed-off-by: Kevin Hilman (TI) <khilman@xxxxxxxxxxxx>
Reviewed-by: Kendall Willis <k-willis@xxxxxx>