Name

of_get_cpu_node — get device node associated with the given logical CPU

Synopsis

struct device_node * of_get_cpu_node (int cpu,
 unsigned int * thread);
 

Arguments

cpu

Logical cpu index for which node is required

thread

If not NULL, local thread number within the physical core is returned

Description

Retrieve the device node for the given logical CPU index. It should be used to initialize the of_node in the cpu device. Once of_node in the cpu device is populated, all the further references can use that instead.

CPU logical to physical index mapping is architecture specific and is built before booting secondary cores. This function uses arch_match_cpu_phys_id which can be overridden by architecture specific implementation.

Return

A node pointer if found, with refcount incremented, use of_node_put on it when done. NULL if node is not found.