* Re: [RFC/PATCH 2/3] of: add of_lookup_stdout() utility function
@ 2008-08-07 19:20 Milton Miller
2008-08-07 19:22 ` Timur Tabi
0 siblings, 1 reply; 10+ messages in thread
From: Milton Miller @ 2008-08-07 19:20 UTC (permalink / raw)
To: Timur Tabi, Yoder Stuart
Cc: linuxppc-dev, devicetree-discuss, paulus, miltonm, David Gibson
TimurTabi wrote:
> Yoder Stuart wrote:
>
> > The second was the idea that we may need a
> > /aliases/stdin as well. You could conceptually have
> > stdout be a monitor and a stdin be a keyboard.
>
> I don't think the hypervisor console subsystem supports
> this. I don't see any way of registering separate clients
> for input vs. output.
Why should what the hvc driver support have any effect on
what the binding should be?
And anyways, both the boot wrapper and udbg (and hence early
debug console) have totally indepenedent functions for
reading and writing.
And for that matter, we also support output on monitor and
input on keyboard for linear frame buffer on 6xx via the
btext output (but only adb input).
milton
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [RFC/PATCH 2/3] of: add of_lookup_stdout() utility function 2008-08-07 19:20 [RFC/PATCH 2/3] of: add of_lookup_stdout() utility function Milton Miller @ 2008-08-07 19:22 ` Timur Tabi [not found] ` <489B4B89.1010507-KZfg59tc24xl57MIdRCFDg@public.gmane.org> 0 siblings, 1 reply; 10+ messages in thread From: Timur Tabi @ 2008-08-07 19:22 UTC (permalink / raw) To: miltonm Cc: linuxppc-dev, devicetree-discuss, paulus, Yoder Stuart, David Gibson Milton Miller wrote: > Why should what the hvc driver support have any effect on > what the binding should be? Because my hypervisor console driver uses the hypervisor console/tty subsystem. If the subsystem assumes one stdout/stdin device, then I must abide by that. -- Timur Tabi Linux kernel developer at Freescale ^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <489B4B89.1010507-KZfg59tc24xl57MIdRCFDg@public.gmane.org>]
* Re: [RFC/PATCH 2/3] of: add of_lookup_stdout() utility function [not found] ` <489B4B89.1010507-KZfg59tc24xl57MIdRCFDg@public.gmane.org> @ 2008-08-07 19:38 ` Scott Wood 0 siblings, 0 replies; 10+ messages in thread From: Scott Wood @ 2008-08-07 19:38 UTC (permalink / raw) To: Timur Tabi Cc: devicetree-discuss-mnsaURCQ41sdnm+yROfE0A, miltonm-ogEGBHC/i9Y, linuxppc-dev-mnsaURCQ41sdnm+yROfE0A Timur Tabi wrote: > Milton Miller wrote: > >> Why should what the hvc driver support have any effect on >> what the binding should be? > > Because my hypervisor console driver uses the hypervisor console/tty subsystem. > If the subsystem assumes one stdout/stdin device, then I must abide by that. So fix the subsystem, don't use the subsystem, or live with the fact that you support a subset of what the device tree can express. Don't cripple the device tree because of that. -Scott ^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <20080806055214.30717.86092.stgit@trillian.secretlab.ca>]
[parent not found: <20080806060239.30717.79273.stgit@trillian.secretlab.ca>]
[parent not found: <20080805.233205.201125898.davem@davemloft.net>]
[parent not found: <18585.31504.836857.829592@cargo.ozlabs.ibm.com>]
* Re: [RFC/PATCH 2/3] of: add of_lookup_stdout() utility function [not found] ` <18585.31504.836857.829592@cargo.ozlabs.ibm.com> @ 2008-08-06 13:31 ` Grant Likely 2008-08-06 16:25 ` Segher Boessenkool 2008-08-07 22:35 ` Benjamin Herrenschmidt 0 siblings, 2 replies; 10+ messages in thread From: Grant Likely @ 2008-08-06 13:31 UTC (permalink / raw) To: Paul Mackerras; +Cc: devicetree-discuss, miltonm, linuxppc-dev, David Miller On Wed, Aug 6, 2008 at 4:21 AM, Paul Mackerras <paulus@samba.org> wrote: > David Miller writes: > >> On sparc platforms this is obtained differently. We obtain the 32-bit >> instance value of "/chosen/stdout" and convert that into a prom device >> node path using "instance-to-path". > > That's actually exactly what we do too, the linux,stdout-path property > is just a cache of the result of that process. The difference is that > we have to do it early on while we still have OF around, while you can > do it later. It's not what we do with flattened device trees blobs though. In the flattened tree we're not using a /chosen/stdout property, just the linux,stdout-path one. The question that remains is; should there be? Should the dt blobs use /chosen/stdout also? (I'm not familiar enough with real OF to know the answer. I'm assuming that an instance value is not the same as a phandle). g. > > Paul. > -- Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFC/PATCH 2/3] of: add of_lookup_stdout() utility function 2008-08-06 13:31 ` Grant Likely @ 2008-08-06 16:25 ` Segher Boessenkool 2008-08-06 17:09 ` Mitch Bradley 2008-08-07 0:40 ` David Gibson 2008-08-07 22:35 ` Benjamin Herrenschmidt 1 sibling, 2 replies; 10+ messages in thread From: Segher Boessenkool @ 2008-08-06 16:25 UTC (permalink / raw) To: Grant Likely Cc: linuxppc-dev, devicetree-discuss, Paul Mackerras, David Miller, miltonm > It's not what we do with flattened device trees blobs though. In the > flattened tree we're not using a /chosen/stdout property, just the > linux,stdout-path one. > > The question that remains is; should there be? Should the dt blobs > use /chosen/stdout also? (I'm not familiar enough with real OF to > know the answer. I'm assuming that an instance value is not the same > as a phandle). ihandles and phandles are not the same thing in OF. Since in the "flat world" we cannot have instances, we should use phandles instead of ihandles for the things in /chosen. I thought we agreed on that already, perhaps I am wrong? Segher ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFC/PATCH 2/3] of: add of_lookup_stdout() utility function 2008-08-06 16:25 ` Segher Boessenkool @ 2008-08-06 17:09 ` Mitch Bradley 2008-08-07 0:40 ` David Gibson 1 sibling, 0 replies; 10+ messages in thread From: Mitch Bradley @ 2008-08-06 17:09 UTC (permalink / raw) To: Segher Boessenkool Cc: linuxppc-dev, devicetree-discuss, David Miller, miltonm Segher Boessenkool wrote: >> It's not what we do with flattened device trees blobs though. In the >> flattened tree we're not using a /chosen/stdout property, just the >> linux,stdout-path one. >> >> The question that remains is; should there be? Should the dt blobs >> use /chosen/stdout also? (I'm not familiar enough with real OF to >> know the answer. I'm assuming that an instance value is not the same >> as a phandle). The difference between a phandle and an ihandle is similar to the difference between (the inode of) an executable files on disk and (the process id of) a running process. A phandle refers to the static information that describes a device, while an ihandle refers to a particular (out of potentially several) active instantiation of the OFW driver for that devices. An "instance value" is a data item that can have a different value for each of the running instances of a given driver. In the analogy, an instance value is like a data segment variable. Given an ihandle, you can get the corresponding phandle with ihandle>phandle. You can't go from phandle to ihandle, because that direction is one-to-many. Why you you ever need more than one running instance of a given driver? For leaf devices, it is pretty rare to have multiple instances. Multiple instances are more often used for intermediate nodes. The same intermediate node - for example a usb node - is often the parent of several leaf nodes that are active simultaneously. When you open a device, its device tree parents up to the root are implicitly opened. Each such instance can hold dynamic state on behalf of its children. > > ihandles and phandles are not the same thing in OF. Since in the > "flat world" we cannot have instances, we should use phandles instead > of ihandles for the things in /chosen. I thought we agreed on that > already, perhaps I am wrong? > > > Segher > > _______________________________________________ > devicetree-discuss mailing list > devicetree-discuss@ozlabs.org > https://ozlabs.org/mailman/listinfo/devicetree-discuss > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFC/PATCH 2/3] of: add of_lookup_stdout() utility function 2008-08-06 16:25 ` Segher Boessenkool 2008-08-06 17:09 ` Mitch Bradley @ 2008-08-07 0:40 ` David Gibson 1 sibling, 0 replies; 10+ messages in thread From: David Gibson @ 2008-08-07 0:40 UTC (permalink / raw) To: Segher Boessenkool Cc: linuxppc-dev, devicetree-discuss, David Miller, miltonm On Wed, Aug 06, 2008 at 06:25:48PM +0200, Segher Boessenkool wrote: >> It's not what we do with flattened device trees blobs though. In the >> flattened tree we're not using a /chosen/stdout property, just the >> linux,stdout-path one. >> >> The question that remains is; should there be? Should the dt blobs >> use /chosen/stdout also? (I'm not familiar enough with real OF to >> know the answer. I'm assuming that an instance value is not the same >> as a phandle). > > ihandles and phandles are not the same thing in OF. Since in the > "flat world" we cannot have instances, we should use phandles instead > of ihandles for the things in /chosen. I thought we agreed on that > already, perhaps I am wrong? Not that I recall. In general we've been avoiding using anything that traditionally contains an ihandle; hence the direct use of linux,stdout-path when using a flat tree. -- 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 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFC/PATCH 2/3] of: add of_lookup_stdout() utility function 2008-08-06 13:31 ` Grant Likely 2008-08-06 16:25 ` Segher Boessenkool @ 2008-08-07 22:35 ` Benjamin Herrenschmidt 1 sibling, 0 replies; 10+ messages in thread From: Benjamin Herrenschmidt @ 2008-08-07 22:35 UTC (permalink / raw) To: Grant Likely Cc: devicetree-discuss, miltonm, linuxppc-dev, Paul Mackerras, David Miller > It's not what we do with flattened device trees blobs though. In the > flattened tree we're not using a /chosen/stdout property, just the > linux,stdout-path one. > > The question that remains is; should there be? Should the dt blobs > use /chosen/stdout also? (I'm not familiar enough with real OF to > know the answer. I'm assuming that an instance value is not the same > as a phandle). Yup, there are two issues there: - The instance value would have to be converted to a phandle while OF is still alive. I initially did that and added a stdout-node or so property, but that still hit the next issue. - IBM machines has this weird distinction between the real phandle and the ibm,phandle, the later being the same except for things that get hotplugged ... and some of the vdevices. We got really confused trying to sort that out with the output device. So in the end, I decided to just convert the ihandle to a path and stick that path in the device-tree. Cheers, Ben. ^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <ed82fe3e0808060946v39992095pfb6b85726b7d307d@mail.gmail.com>]
[parent not found: <20080807061254.GB12571@yookeroo.seuss>]
* RE: [RFC/PATCH 2/3] of: add of_lookup_stdout() utility function [not found] ` <20080807061254.GB12571@yookeroo.seuss> @ 2008-08-07 17:28 ` Yoder Stuart 2008-08-07 18:11 ` Timur Tabi 0 siblings, 1 reply; 10+ messages in thread From: Yoder Stuart @ 2008-08-07 17:28 UTC (permalink / raw) To: David Gibson, TABI TIMUR Cc: linuxppc-dev, devicetree-discuss, paulus, miltonm > -----Original Message----- > From: linuxppc-dev-bounces+b08248=freescale.com@ozlabs.org > [mailto:linuxppc-dev-bounces+b08248=freescale.com@ozlabs.org] > On Behalf Of David Gibson > Sent: Thursday, August 07, 2008 1:13 AM > To: Tabi Timur > Cc: linuxppc-dev@ozlabs.org; paulus@samba.org; miltonm@bga.com > Subject: Re: [RFC/PATCH 2/3] of: add of_lookup_stdout() > utility function > > On Wed, Aug 06, 2008 at 11:46:47AM -0500, Timur Tabi wrote: > > On Wed, Aug 6, 2008 at 1:02 AM, Grant Likely > <grant.likely@secretlab.ca> wrote: > > > From: Grant Likely <grant.likely@secretlab.ca> > > > > > > of_lookup_stdout() is useful for figuring out what device > to use as output > > > for early boot progress messages. It returns the node > pointed to by the > > > linux,stdout-path property in the chosen node. > > > > I thought linux,stdout-path is deprecated are we're supposed to be > > using the aliases node instead? > > During the ePAPR process this idea came up - standardising a 'stdout' > alias that would replace linux,stdout-path in chosen. However that > was done in ignorance of the history of the linux,stdout-path property > and its connection to the stdout ihandle in chosen. In any case, the > proposed 'stdout' alias didn't make the final cut for ePAPR, so how to > address this for flat-tree systems is still an open question. In the ePAPR discussion I think we generally agreed that an alias was better than a property under /chosen. There were 2 things that caused us to delete the /aliases/stdout. One was discussions around whether we needed to support multiple consoles somehow. The second was the idea that we may need a /aliases/stdin as well. You could conceptually have stdout be a monitor and a stdin be a keyboard. Stuart ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFC/PATCH 2/3] of: add of_lookup_stdout() utility function 2008-08-07 17:28 ` Yoder Stuart @ 2008-08-07 18:11 ` Timur Tabi 0 siblings, 0 replies; 10+ messages in thread From: Timur Tabi @ 2008-08-07 18:11 UTC (permalink / raw) To: Yoder Stuart Cc: linuxppc-dev, devicetree-discuss, paulus, miltonm, David Gibson Yoder Stuart wrote: > The second was the idea that we may need a /aliases/stdin as well. > You could conceptually have stdout be a monitor and a stdin > be a keyboard. I don't think the hypervisor console subsystem supports this. I don't see any way of registering separate clients for input vs. output. -- Timur Tabi Linux kernel developer at Freescale ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2008-08-07 22:35 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-07 19:20 [RFC/PATCH 2/3] of: add of_lookup_stdout() utility function Milton Miller
2008-08-07 19:22 ` Timur Tabi
[not found] ` <489B4B89.1010507-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2008-08-07 19:38 ` Scott Wood
[not found] <20080806055214.30717.86092.stgit@trillian.secretlab.ca>
[not found] ` <20080806060239.30717.79273.stgit@trillian.secretlab.ca>
[not found] ` <20080805.233205.201125898.davem@davemloft.net>
[not found] ` <18585.31504.836857.829592@cargo.ozlabs.ibm.com>
2008-08-06 13:31 ` Grant Likely
2008-08-06 16:25 ` Segher Boessenkool
2008-08-06 17:09 ` Mitch Bradley
2008-08-07 0:40 ` David Gibson
2008-08-07 22:35 ` Benjamin Herrenschmidt
[not found] ` <ed82fe3e0808060946v39992095pfb6b85726b7d307d@mail.gmail.com>
[not found] ` <20080807061254.GB12571@yookeroo.seuss>
2008-08-07 17:28 ` Yoder Stuart
2008-08-07 18:11 ` Timur Tabi
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox