]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
OF-device: Don't overwrite numa_node in device registration
authorJeremy Kerr <jk@ozlabs.org>
Sun, 26 Oct 2008 21:51:25 +0000 (21:51 +0000)
committerPaul Mackerras <paulus@samba.org>
Fri, 31 Oct 2008 05:12:01 +0000 (16:12 +1100)
commit6098e2ee14849e0819ffa887ebf470dcfad4a2be
treea5e6873028e49867cfd66a519a7ed8f997e36691
parent16c29d180becc5bdf92fd0fc7314a44a671b5f4e
OF-device: Don't overwrite numa_node in device registration

Currently, the numa_node of OF-devices will be overwritten during
device_register, which simply sets the node to -1.  On cell machines,
this means that devices can't find their IOMMU, which is referenced
through the device's numa node.

Set the numa node for OF devices with no parent, and use the
lower-level device_initialize and device_add functions, so that the
node is preserved.

We can remove the call to set_dev_node in of_device_alloc, as it
will be overwritten during register.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/kernel/of_device.c
drivers/of/device.c