[PATCH] ppc64: SMU partitions & device-tree

Nathan Lynch ntl at pobox.com
Fri Sep 23 15:50:12 EST 2005

Benjamin Herrenschmidt wrote:
> On Thu, 2005-09-22 at 10:29 -0500, Nathan Lynch wrote:
> > 
> > I think this is abusing devtree_lock, which is meant to protect
> > traversal of the device tree and not the contents of nodes.  True,
> > this serializes prom_add_property itself, and will prevent corruption
> > of the node's property list.  But I think I'd rather the SMU code take
> > care of this itself, i.e. use its own mutex to serialize the addition
> > of properties to /smu.
> It does, but I felt like prom_add_property() should be made a bit safer.
> It's definitely an abuse of the devtree_lock, but knowing how rarely
> prom_add_property() is to be called, I don't think it's that much of a
> problem, what do you think ?

As long as you don't expect us to need to _remove_ properties from
live nodes, I think it's ok.  Otherwise we'll need something like a
per-node lock.

More information about the Linuxppc64-dev mailing list