Re: [PATCH v16 3/8] thermal/qcom/lmh: Switch to match data for SoC CPU-to-node mappings
From: Konrad Dybcio
Date: Tue Dec 01 2026 - 08:21:41 EST
On 12/1/26 1:37 PM, Sreeshankar K wrote:
> lmh_probe() hardcodes the mapping of logical CPU IDs to LMh hardware
> cluster node IDs: CPU 0 maps to LMH_CLUSTER0_NODE_ID, and CPU 4 maps to
> LMH_CLUSTER1_NODE_ID.
>
> This assumption only holds true for 4+4 big.LITTLE architectures like
> SDM845 and SM8150. On platforms with asymmetric cluster layouts, such
> as the 6+2 topology on SM7250 where the big cluster starts at CPU 6,
> lmh_probe() fails with -EINVAL. Consequently, the second LMh node does
> not register its interrupt domain, which in turn causes dependent
> drivers like qcom-cpufreq-hw to fail or indefinitely defer probing via
> fw_devlink.
>
> Address this by introducing an SoC descriptor structure (struct
> lmh_soc_data) and an explicit mapping table (struct lmh_soc_map)
> associated with of_device_id match data. This encapsulates both the
> algorithm enable flags and the CPU-to-node mappings per compatible
> string.
>
> Signed-off-by: Sreeshankar K <sreeshankar0910@xxxxxxxxx>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>
Konrad