On Tue, Oct 24, 2017 at 05:14:18PM +0300, Tero Kristo wrote: > Right now, check_interrupts_property fails with overlays, as the phandle > for the interrupt-parent can be orphan. Avoid this by allowing the orphan > node to pass the assert check. > > The process_checks() call is also moved later during init sequence, > so that we can use the global variable generate_fixups to check if > we are compiling an overlay. > > Signed-off-by: Tero Kristo <t-kristo@xxxxxx> Applied, with a bit of a tweak. > --- > dtc.c | 3 ++- > livetree.c | 2 +- > 2 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/dtc.c b/dtc.c > index 5ed873c..a0f4603 100644 > --- a/dtc.c > +++ b/dtc.c > @@ -319,13 +319,14 @@ int main(int argc, char *argv[]) > dti->boot_cpuid_phys = cmdline_boot_cpuid; > > fill_fullpaths(dti->dt, ""); > - process_checks(force, dti); > > /* on a plugin, generate by default */ > if (dti->dtsflags & DTSF_PLUGIN) { > generate_fixups = 1; > } > > + process_checks(force, dti); > + > if (auto_label_aliases) > generate_label_tree(dti, "aliases", false); > > diff --git a/livetree.c b/livetree.c > index 6846ad2..d6a7681 100644 > --- a/livetree.c > +++ b/livetree.c > @@ -540,7 +540,7 @@ struct node *get_node_by_phandle(struct node *tree, cell_t phandle) > { > struct node *child, *node; > > - assert((phandle != 0) && (phandle != -1)); > + assert((phandle != 0 && (phandle != -1 || generate_fixups == 1))); > > if (tree->phandle == phandle) { > if (tree->deleted) -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Attachment:
signature.asc
Description: PGP signature