[PATCH 2/8] make OF node fixup code usable at runtime

Benjamin Herrenschmidt benh at kernel.crashing.org
Fri Mar 11 14:01:26 EST 2005


On Wed, 2005-03-09 at 18:51 -0600, Nathan Lynch wrote:
> At boot we recurse through the device tree "fixing up" various fields
> and properties in the device nodes.  Long ago, to support DLPAR and
> hotplug, we largely duplicated some of this fixup code, the main
> difference being that the new code used kmalloc for allocating various
> data structures which are attached to the new device nodes.
> 
> This patch kills most of the duplicated code and makes finish_node,
> finish_node_interrupts, and interpret_pci_props suitable for use at
> runtime.  These functions, if passed a null mem_start argument, will
> use kmalloc for allocating extra data structures for the device node
> being processed.  Not terribly elegant, but it seems worth it to get
> rid of the duplicated code (and bugs).

Maybe hide that logic in a macro or inline ?

Ben.





More information about the Linuxppc64-dev mailing list