[SLOF] [PATCH slof] usb-host: Do not override USB node name
segher at kernel.crashing.org
Wed Sep 4 22:49:03 AEST 2019
On Wed, Sep 04, 2019 at 09:04:33AM +0200, Thomas Huth wrote:
> On 03/09/2019 05.29, Alexey Kardashevskiy wrote:
> > QEMU creates nodes for PCI devices and preserves the node names with
> > one exception for USB hosts; this fixes it.
> > Fixes: be9b2fa44c73 ("pci: Use QEMU created PCI device nodes")
> > Signed-off-by: Alexey Kardashevskiy <aik at ozlabs.ru>
> > ---
> > David, this is how we loose QEMU's "usb-xhci@" nodename.
> > I am very curious now how it ever worked without an 's' in front
> > of " usb".
> " usb" is pretty much the same as s" usb" ... the only difference
> between '"' and 's"' is that you can encode characters via hex numbers
> in the string, e.g. try:
> " hello "(61) world" type
> See OF1275 page 102 for details.
s" is a standard Forth word, and " is not. Paflof (the core engine
of SLOF) aims to be a standard Forth system, so it implements s" ,
but it did not implement " . It turns out that
: hw ( - str . ) s" hello" s" " $cat s" world" $cat ;
is quite a bit nicer to read than
: hw ( - str . ) " hello" " " $cat " world" $cat ;
It is also faster, and in the earlier days of SLOF it was the only
thing that *existed*, so the convention stuck.
More information about the SLOF