On Tue, Jan 6, 2009 at 4:13 PM, Marc Jones marcj303@gmail.com wrote:
I agree it is parents before siblings but I thought it looked more like a problem with the statictree. I must not understand .next.
from http://pastebin.ca/1301081
dev_apic_0 has a .sibling = &dev_domain_0 and .next = &dev_domain_0_pci_1_0
Then later in the last device domain dev_domain_0_pci_f_2 has a .next = &dev_domain_0.
I would expect .sibling and .next to point to the &dev_domain_0 and then dev_domain_0 to have .next = &dev_domain_0_pci_1_0
Yes. I would too. It's that way because parents get defined after children. When the tree is being read, the full parent is not read (we don't get to the closing brace) until after we read all the children. It seems confusing to me, but it is the way dts works.
dev_cpus looks like I would expect .sibling = &dev_apic_0 and .next = &dev_apic_0. dev_domain_0_pci_f_0 also has the same .sibling and .next.
Yes. Children are complete before their sibling is read in, so all devices with childless siblings have the same .sibling and .next.
I hope that doesn't sound like blather :)
Thanks, Myles