[SLOF] [PATCH slof] fdt: Avoid recursion when traversing tree

Segher Boessenkool segher at kernel.crashing.org
Tue Jul 21 07:23:30 AEST 2020


On Mon, Jul 20, 2020 at 10:50:35AM +1000, Alexey Kardashevskiy wrote:
> On 18/07/2020 03:49, Segher Boessenkool wrote:
> > On Fri, Jul 17, 2020 at 09:02:34PM +1000, Alexey Kardashevskiy wrote:
> >>> (If some heavier routine is called for every node, you can put the test
> >>> *there* instead, without making everything slow).
> >>
> >> Making everything slow is perfectly fine for debugging SLOF.
> > 
> > Not if you have to debug on real hardware, or debug the hardware driver
> > itself, or even the actual hardware itself.
> SLOF on real hardware in 2020? :)

*Shrug*.  It should still work!

> >> Thankfully
> >> SLOF is not that complicated (real mode, 1 CPU, 1 device open at the
> >> time) and normally a VM config is enough to reproduce the problem.
> > 
> > SLOF always has many devices open at the same time.  Only one ihandle
> > is in my-self at any point of time, of course.  This very nicely
> > simplifies how you have to deal with things.
> I meant it does not open more than a single boot device (one or more
> instances, with packages), and yeah, it keeps serial/vga and TPM open
> but 1) it is not really many

In the normal case, whenever a device is opened first all its bus parent
devices are opened, recursively.  You also can have multiple files (on
block devices) open at once, etc.  This is the same on all Open Firmware

> 2) checking stack boundary at every step
> would make a useful debug tool.

Yes, and very expensive.  I don't dispute that it can be useful in
certain cases :-)

(It is easy to add in such cases, as well.)


More information about the SLOF mailing list