Re: [PATCH v2] cpu-topology: Skip the exist but not possible cpu nodes

From: Sudeep Holla
Date: Tue Jan 14 2020 - 05:30:03 EST


On Tue, Jan 14, 2020 at 01:42:25AM +0000, Zengtao (B) wrote:
> Could you help to explain here?
> I understand there are two abnormal cases:
> 1. The cpu node exist in the device tree, but not a possible cpu.
> This case can be caught by of_cpu_node_to_id's return value.

Yes if of_cpu_node_to_id returns -ENODEV, it means there's no logical
CPU associated with this DT node.

> 2. The cpu node does not exist. This case can be caught by above logic. Or
> do you think of_parse_phandle's return value is enough?

Again yes, there's nothing extra needed.

The only change you need is to consider -ENODEV while handling the case(1)

--
Regards,
Sudeep