From: Michael Bohan <mbohan-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
To: David Daney <ddaney-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
Cc: Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Pantelis Antoniou
<panto-wVdstyuyKrO8r51toPun2/C9HSW9iNxf@public.gmane.org>,
Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>,
David Gibson
<david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org,
rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org,
ralf-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
david.daney-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org,
linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] of/lib: Export fdt routines to modules
Date: Fri, 18 Oct 2013 12:32:29 -0700 [thread overview]
Message-ID: <20131018193229.GA30141@codeaurora.org> (raw)
In-Reply-To: <52616228.80002-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
On Fri, Oct 18, 2013 at 09:30:32AM -0700, David Daney wrote:
> On 10/18/2013 08:57 AM, Rob Herring wrote:
> [...]
> >
> >Unflattening is definitely the right
> >direction to go here.
> >
>
> I wonder if that is really true.
>
> The device tree in question is very short lived, and used to control
> the configuration of some hardware device when loading the driver.
>
> The use of it is completely contained within a single driver (at
> least that is my understanding), it is not information that needs to
> be shared system wide.
That's correct.
> Given that it is a driver implementation issue, rather than making
> things work nicely system wide, I don't think it really matters what
> is done.
>
> It may be that the overhead of unflattening the tree and then
> freeing it, is much greater than just extracting a few things from
> the FDT.
Yes, this was my original thought as well. On the other hand,
having libfdt in the kernel does add a little extra bloat, and so
it seems a tradeoff from one-time runtime overhead to footprint.
> That said, I don't really have a preference for what is done. My
> original questions were targeted at understanding this particular
> use case.
My preference is probably straight libfdt calls, but if others
think that unpacking is a better solution, I'm able to go that
route as well. My only concern there is that we provide a means
to detect invalid dtb image (ex. handle error codes) and also
free the device_node allocations once the device is released.
Thanks,
Mike
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
--
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
WARNING: multiple messages have this Message-ID (diff)
From: Michael Bohan <mbohan@codeaurora.org>
To: David Daney <ddaney@caviumnetworks.com>
Cc: Rob Herring <robherring2@gmail.com>,
Pantelis Antoniou <panto@antoniou-consulting.com>,
Guenter Roeck <linux@roeck-us.net>,
David Gibson <david@gibson.dropbear.id.au>,
linux-kernel@vger.kernel.org, grant.likely@secretlab.ca,
rob.herring@calxeda.com, ralf@linux-mips.org,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
david.daney@cavium.com, linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH] of/lib: Export fdt routines to modules
Date: Fri, 18 Oct 2013 12:32:29 -0700 [thread overview]
Message-ID: <20131018193229.GA30141@codeaurora.org> (raw)
In-Reply-To: <52616228.80002@caviumnetworks.com>
On Fri, Oct 18, 2013 at 09:30:32AM -0700, David Daney wrote:
> On 10/18/2013 08:57 AM, Rob Herring wrote:
> [...]
> >
> >Unflattening is definitely the right
> >direction to go here.
> >
>
> I wonder if that is really true.
>
> The device tree in question is very short lived, and used to control
> the configuration of some hardware device when loading the driver.
>
> The use of it is completely contained within a single driver (at
> least that is my understanding), it is not information that needs to
> be shared system wide.
That's correct.
> Given that it is a driver implementation issue, rather than making
> things work nicely system wide, I don't think it really matters what
> is done.
>
> It may be that the overhead of unflattening the tree and then
> freeing it, is much greater than just extracting a few things from
> the FDT.
Yes, this was my original thought as well. On the other hand,
having libfdt in the kernel does add a little extra bloat, and so
it seems a tradeoff from one-time runtime overhead to footprint.
> That said, I don't really have a preference for what is done. My
> original questions were targeted at understanding this particular
> use case.
My preference is probably straight libfdt calls, but if others
think that unpacking is a better solution, I'm able to go that
route as well. My only concern there is that we provide a means
to detect invalid dtb image (ex. handle error codes) and also
free the device_node allocations once the device is released.
Thanks,
Mike
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
next prev parent reply other threads:[~2013-10-18 19:32 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-16 23:27 [PATCH] of/lib: Export fdt routines to modules Michael Bohan
2013-10-16 23:39 ` David Daney
2013-10-16 23:39 ` David Daney
2013-10-17 0:27 ` Michael Bohan
2013-10-17 4:54 ` Guenter Roeck
2013-10-17 23:51 ` Michael Bohan
2013-10-18 0:44 ` Guenter Roeck
2013-10-18 2:54 ` Michael Bohan
2013-10-18 13:28 ` Pantelis Antoniou
2013-10-18 15:57 ` Rob Herring
2013-10-18 16:16 ` Guenter Roeck
2013-10-18 16:30 ` David Daney
2013-10-18 16:30 ` David Daney
[not found] ` <52616228.80002-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
2013-10-18 19:32 ` Michael Bohan [this message]
2013-10-18 19:32 ` Michael Bohan
[not found] ` <20131018193229.GA30141-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2013-10-18 21:20 ` Rob Herring
2013-10-18 21:20 ` Rob Herring
2013-10-19 1:49 ` Michael Bohan
2013-10-19 3:41 ` Guenter Roeck
2013-10-18 18:38 ` Mark Rutland
[not found] ` <20131018183804.GA8546-NuALmloUBlrZROr8t4l/smS4ubULX0JqMm0uRHvK7Nw@public.gmane.org>
2013-10-19 1:41 ` Michael Bohan
2013-10-19 1:41 ` Michael Bohan
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=20131018193229.GA30141@codeaurora.org \
--to=mbohan-sgv2jx0feol9jmxxk+q4oq@public.gmane.org \
--cc=david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org \
--cc=david.daney-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org \
--cc=ddaney-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
--cc=linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org \
--cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=panto-wVdstyuyKrO8r51toPun2/C9HSW9iNxf@public.gmane.org \
--cc=ralf-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org \
--cc=rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@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.