[PATCH v4 3/6] powercap: dtpm: Remove duplicate RK3399 CPU hierarchy nodes

Lukasz Luba lukasz.luba at arm.com
Fri Oct 30 07:03:30 PDT 2026



On 10/29/26 16:56, Daniel Lezcano wrote:
> The DTPM CPU backend registers one powercap zone per cpufreq policy,
> not per CPU. On RK3399, CPUs sharing the same cpufreq policy therefore
> map to the same DTPM zone.
> 
> Remove the redundant CPU nodes from the RK3399 hierarchy and keep only
> one CPU node per cpufreq policy. The backend already suppresses duplicate
> registration through its per-CPU state, so the removed entries are
> redundant descriptions of the same zones. Keep both CPU policy domains
> and the GPU in the hierarchy, preparing for one created zone per generic
> hierarchy node.
> 
> Also fix indentation in the Rockchip device match table.
> 
> Signed-off-by: Daniel Lezcano <daniel.lezcano at oss.qualcomm.com>
> ---
> Changes in v4 (since v3):
> - Rebase on v7.3; no code or commit-description changes.
> 
> Changes in v3 (since v2):
> - Rebase on v7.3-rc7.
> - Fix Rockchip match-table indentation here rather than in patch 1.
> - Clarify that the existing backend suppresses duplicate registration.
> 
>   drivers/soc/rockchip/dtpm.c | 22 +++++-----------------
>   1 file changed, 5 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/soc/rockchip/dtpm.c b/drivers/soc/rockchip/dtpm.c
> index b36d4f752c30..e71f315fbb6b 100644
> --- a/drivers/soc/rockchip/dtpm.c
> +++ b/drivers/soc/rockchip/dtpm.c
> @@ -20,30 +20,18 @@ static struct dtpm_node __initdata rk3399_hierarchy[] = {
>   	[2] = { .name = "/cpus/cpu at 0",
>   		.type = DTPM_NODE_DT,
>   		.parent = &rk3399_hierarchy[1] },
> -	[3] = { .name = "/cpus/cpu at 1",
> +	[3] = { .name = "/cpus/cpu at 100",
>   		.type = DTPM_NODE_DT,
>   		.parent = &rk3399_hierarchy[1] },
> -	[4] = { .name = "/cpus/cpu at 2",
> +	[4] = { .name = "/gpu at ff9a0000",
>   		.type = DTPM_NODE_DT,
>   		.parent = &rk3399_hierarchy[1] },
> -	[5] = { .name = "/cpus/cpu at 3",
> -		.type = DTPM_NODE_DT,
> -		.parent = &rk3399_hierarchy[1] },
> -	[6] = { .name = "/cpus/cpu at 100",
> -		.type = DTPM_NODE_DT,
> -		.parent = &rk3399_hierarchy[1] },
> -	[7] = { .name = "/cpus/cpu at 101",
> -		.type = DTPM_NODE_DT,
> -		.parent = &rk3399_hierarchy[1] },
> -	[8] = { .name = "/gpu at ff9a0000",
> -		.type = DTPM_NODE_DT,
> -		.parent = &rk3399_hierarchy[1] },
> -	[9] = { /* sentinel */ }
> +	[5] = { /* sentinel */ }
>   };
>   
>   static struct of_device_id __initdata rockchip_dtpm_match_table[] = {
> -        { .compatible = "rockchip,rk3399", .data = rk3399_hierarchy },
> -        {},
> +	{ .compatible = "rockchip,rk3399", .data = rk3399_hierarchy },
> +	{},
>   };
>   
>   static int __init rockchip_dtpm_init(void)


Reviewed-by: Lukasz Luba <lukasz.luba at arm.com>



More information about the linux-arm-kernel mailing list