|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XenPPC] Fixed bug in ofd find by property
A clarification about this patch and the problem that it fixes. During boot we copy the OF tree to an OFD tree. Since the orignal OF tree has properties whose values are references to other nodes, we fixup the OFD tree. To do so we build a list of properties that are known, by their semantic, to be references to other nodes. The code that build this list iterates through the siblings of a node and recurses down the children of a node. The list is implemented by a head and a tail pointer. The recursive steps updates the head pointer by returning the head pointer that was established in this level of the recursion and recursively by any other level. In the original version of the code, i.e, before this patch, the tail pointer was not updated by a recursive calls; thus a return from a recursive call would revert to the previous value of the tail pointer. Since items are added at end tail end of the list, return from recursion would effectively truncate the list. My patch invokes the recursive step with a reference to the tail pointer. This is certainly not elegant. We could alternatively change this so that the list is compiled in the reverse order by pushing elements at the head of the list. This would eliminate the need for a tail pointer entirely. For the use of this function that I outlined above this should not be a problem. I do not know if any other uses of this function require a certain order. Maria Butrico wrote:
_______________________________________________ Xen-ppc-devel mailing list Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-ppc-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |