于 2020年5月20日 GMT+08:00 下午7:33:22, Paul Cercueil <p...@crapouillou.net> 写到:
>>
>> Yes, the current way is indeed a little problem, it will cause
>> num_possible_cpus() == NR_CPUS, I will try to find a better way.
>
>You can do:
>
>for_each_of_cpu_node(cpu_node) {
> cpu = of_cpu_node_to_id(cpu_node);
> __cpu_number_map[cpu] = cpu;
> __cpu_logical_map[cpu] = cpu;
> set_cpu_possible(cpu, true);
>}
>
FYI: There is a abandoned DeviceTree[1], parser. You can take it.
I'm going to submit this topology clean-up for next release cycle
but you can pick it for now.
[...]
[1]: https://lkml.org/lkml/2020/4/11/1088
--
Jiaxun Yang