All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gavin Shan <gwshan-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
To: Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Gavin Shan
	<gwshan-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	andrew.donnellan-8fk3Idey6ehBDgjK7y7TUQ@public.gmane.org,
	Rhyland Klein <rklein-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH] drivers/of: Fix depth for sub-tree blob in unflatten_dt_nodes()
Date: Thu, 9 Jun 2016 10:40:07 +1000	[thread overview]
Message-ID: <20160609004007.GA9222@gwshan> (raw)
In-Reply-To: <CAL_Jsq+D86LbGTiDbokSGNMownTMDteji_NmJNxz4AqTYMpJhw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Wed, Jun 08, 2016 at 11:46:41AM -0500, Rob Herring wrote:
>On Wed, Jun 8, 2016 at 1:50 AM, Gavin Shan <gwshan-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org> wrote:
>> The function is unflattening device sub-tree blob if @dad passed to
>> the function is valid. Currently, this functionality is used by PPC
>> PowerNV PCI hotplug driver only. There are possibly multiple nodes
>> in the first level of depth, fdt_next_node() bails immediately when
>> @depth becomes negative before the second device node can be probed
>> successfully. It leads to the device nodes except the first one won't
>> be unflattened successfully.
>>
>> This fixes the issue by setting the initial depth (@inital_depth) to
>> 1 when this function is called to unflatten device sub-tree blob. No
>> logic changes when this function is used to unflatten non-sub-tree
>> blob.
>
>Does this affect anything besides your PCI hotplug stuff? I'd think
>overlays/changesets would be broken, but the unittests aren't failing
>that I recall.
>

Rob, it affects my PCI hotplug stuff only. There are two paths how
unflatten_dt_nodes() is called. No valid @dad specified in (A). PCI
hotplug is the only user specifying valid @dad in (B) and all other
users have invalid @dad.

          A                          B

   unflatten_device_tree     of_fdt_unflatten_tree
   __unflatten_device_tree   __unflatten_device_tree
   unflatten_dt_nodes        unflatten_dt_nodes

With or without this patch, I got same otuput from unittest as below:

### dt-test ### start of unittest - you will see error messages
/testcase-data/phandle-tests/consumer-a: could not get #phandle-cells-missing for /testcase-data/phandle-tests/provider1
/testcase-data/phandle-tests/consumer-a: could not get #phandle-cells-missing for /testcase-data/phandle-tests/provider1
/testcase-data/phandle-tests/consumer-a: could not find phandle
/testcase-data/phandle-tests/consumer-a: could not find phandle
/testcase-data/phandle-tests/consumer-a: arguments longer than property
/testcase-data/phandle-tests/consumer-a: arguments longer than property
irq: XICS didn't like hwirq-0x1 to VIRQ27 mapping (rc=-22)
irq: XICS didn't like hwirq-0x1 to VIRQ27 mapping (rc=-22)
### dt-test ### FAIL of_unittest_platform_populate():782 device deferred probe failed - 0
overlay_is_topmost: #5 clashes #6 @/testcase-data/overlay-node/test-bus/test-unittest8
overlay_removal_is_ok: overlay #5 is not topmost
of_overlay_destroy: removal check failed for overlay #5
### dt-test ### end of unittest - 147 passed, 1 failed


>Rob
>

Thanks,
Gavin

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2016-06-09  0:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-08  6:50 [PATCH] drivers/of: Fix depth for sub-tree blob in unflatten_dt_nodes() Gavin Shan
     [not found] ` <1465368654-24170-1-git-send-email-gwshan-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2016-06-08  8:02   ` Andrew Donnellan
     [not found]     ` <5757D129.4070505-8fk3Idey6ehBDgjK7y7TUQ@public.gmane.org>
2016-06-08  8:04       ` Andrew Donnellan
     [not found]         ` <5757D191.3040805-8fk3Idey6ehBDgjK7y7TUQ@public.gmane.org>
2016-06-08 10:18           ` Gavin Shan
2016-06-08 15:53   ` Rhyland Klein
     [not found]     ` <828431f1-5b74-8aef-c229-7b7469e685ba-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-06-09  4:51       ` Gavin Shan
2016-06-08 16:46   ` Rob Herring
     [not found]     ` <CAL_Jsq+D86LbGTiDbokSGNMownTMDteji_NmJNxz4AqTYMpJhw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-06-09  0:40       ` Gavin Shan [this message]
2016-06-09  4:48   ` Gavin Shan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160609004007.GA9222@gwshan \
    --to=gwshan-23vcf4htsmix0ybbhkvfkdbpr1lh4cv8@public.gmane.org \
    --cc=andrew.donnellan-8fk3Idey6ehBDgjK7y7TUQ@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=rklein-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.