of_get_cpu_node(9)
π of_get_cpu_node(9) β Kernel API Manual π
okay so bestie, this is the Kernel API Manual page for of_get_cpu_node(9), and it's literally about grabbing the device node for a logical CPU. no cap, let's get into it π
β¨ NAME β¨
of_get_cpu_node β get the device node associated with the given logical CPU π
πΈ SYNOPSIS πΈ
struct device_node * of_get_cpu_node (int cpu , unsigned int *thread );
π¦ ARGUMENTS π¦
cpuβ the CPU number (the logical index, bestie) for which the device node is required π§threadβ if it is notNULL, the local thread number within the physical core is returned π
π₯ DESCRIPTION π₯
The main purpose of this function is to retrieve the device node for the given logical CPU index. It should be used to initialize the of_node in cpu device. Once of_node in 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 for the logical cpu with refcount incremented, use of_node_put on it when done. Returns NULL if not found π
π SEE ALSO π
Kernel file ./drivers/of/cpu.c of_get_cpu_hwid(9), of_cpu_device_node_get(9), of_cpu_node_to_id(9), of_get_cpu_state_node(9) π¦
π«Ά cute sign-off: source/version is./drivers/of, datedOctober 2026β periodt, bestie π β¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms