of_get_cpu_node(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 not NULL, 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, dated October 2026 β€” periodt, bestie πŸ’…βœ¨
πŸ“¦ where this page comes from