devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
To: monstr-pSz03upnqPeHXe+LvDLADg@public.gmane.org
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Subject: Re: OF_DYNAMIC usage
Date: Fri, 06 Jul 2012 17:08:40 +1000	[thread overview]
Message-ID: <1341558520.6330.54.camel@pasglop> (raw)
In-Reply-To: <4FF68ADE.3060609-pSz03upnqPeHXe+LvDLADg@public.gmane.org>

On Fri, 2012-07-06 at 08:51 +0200, Michal Simek wrote:
> On 07/06/2012 08:19 AM, Benjamin Herrenschmidt wrote:
> > On Fri, 2012-07-06 at 08:03 +0200, Michal Simek wrote:
> >>>
> >>> The way it works at the moment is that when something new is plugged in,
> >>> the hypervisor talks to a proprietary crap daemon in userspace which
> >>> talks to a special tool (that one we have the source code) which then
> >>> obtains via some FW interfaces a "blob" of bits of device-tree to add
> >>> (or to remove), using a phyp specific format, and echo that stuff
> >>> into /proc/ppc64/ofdt.
> >>
> >> Where is that source code for the special tool?
> >
> > I can dig that for you, however ...
> >
> >> Can you point me to the "phyp specific format"?
> >
> > Same deal, I don't think there's a public doc, however..
> 
> Why is it in the kernel something which does not have any public documentation?
> It seems like that it is more proprietary code.

Don't ask me, it's been there since day 1 of the ppc64 port afaik,
before I was involved in it. I've been wanting to deprecate that
interface for a while, but haven't got to it yet.

> >
> >>    From reconfig.c it looks like that there are some key words like
> >> add_node/remove_node/add_property... follow by space and node name +
> >> options which lookes like dtb format.
> >
> > Right, I would just recommend you don't do that.
> >
> > The need to "hotplug" bits of device-tree is going to be generic enough
> > that we should come up with something better and more generic than that
> > pseries stuff.
> >
> > IE. Some way to pass bits of ftb blob rather than this specific format
> > to begin with, etc...
> 
> Can we discuss this a little bit more?

Sure :-)

>  From my partial reconfiguration understanding is that you have partial bitstream
> which you pass through pcap(IP and driver which can do it) to specific location
> which they are known.
> 
> It means you have to unplug device which is in the same location,
> load partial bitstream via pcap
> register driver and probe it.
> 
> I expect that pcap driver could be aware which driver is at that location
> and is able to plug and unplug it based on description.
> 
> I will ask Xilinx how this is exactly done and I hope I will get any example
> to be able to do some experiments.
>
> >
> > So I'd say just ignore the pseries stuff, I can dig the tool etc... if
> > you -really- need them but I'd rather you don't base your stuff on it,
> > just make up something better&  more generic for you. It will be useful
> > to others.
> 
> My point here is just to try to understand current working version
> to get the better overview how it is done and probably working somehow.
> 
> Of course some ideas how this can/should be done will be helpful.

Well, I think the right way is to have some mechanism (TBD) to be able
to inject into the kernel a bit of device-tree (or remove a bit of
device-tree). Ideally by passing it an FDT blob segment which is a  well
known & documented format.

The kernel would then expand it and call some notifiers which we can use
to create platform devices if needed etc...

Cheers,
Ben.

  parent reply	other threads:[~2012-07-06  7:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-05 12:21 OF_DYNAMIC usage Michal Simek
     [not found] ` <4FF586D1.2050407-pSz03upnqPeHXe+LvDLADg@public.gmane.org>
2012-07-05 13:20   ` Rob Herring
     [not found]     ` <4FF594AD.6000401-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-07-05 20:46       ` Benjamin Herrenschmidt
2012-07-06  6:03         ` Michal Simek
     [not found]           ` <4FF67F96.1040902-pSz03upnqPeHXe+LvDLADg@public.gmane.org>
2012-07-06  6:19             ` Benjamin Herrenschmidt
2012-07-06  6:51               ` Michal Simek
     [not found]                 ` <4FF68ADE.3060609-pSz03upnqPeHXe+LvDLADg@public.gmane.org>
2012-07-06  7:08                   ` Benjamin Herrenschmidt [this message]
2012-07-06  8:02                     ` Michal Simek
     [not found]                       ` <4FF69B83.3000400-pSz03upnqPeHXe+LvDLADg@public.gmane.org>
2012-07-06  8:10                         ` Benjamin Herrenschmidt
2012-07-06  8:18                           ` Michal Simek
2012-07-06 17:57                           ` Stephen Neuendorffer
2012-07-06  5:41       ` Michal Simek

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=1341558520.6330.54.camel@pasglop \
    --to=benh-xvmvhmargas8u2djnn8i7kb+6bgklq7r@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=monstr-pSz03upnqPeHXe+LvDLADg@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).