[SLOF] [PATCH slof v3 5/5] fdt: Pass the resulting device tree to QEMU

Greg Kurz groug at kaod.org
Tue Oct 3 20:22:16 AEDT 2017


On Tue, 3 Oct 2017 19:53:23 +1100
Alexey Kardashevskiy <aik at ozlabs.ru> wrote:

> On 03/10/17 19:48, Greg Kurz wrote:
> > On Tue,  3 Oct 2017 16:15:23 +1100
> > Alexey Kardashevskiy <aik at ozlabs.ru> wrote:
> >   
> >> This creates flatten device tree and passes it to QEMU via a custom
> >> hypercall right before jumping to RTAS.
> >>
> >> On a machine with 256 CPUs and 256 virtual Intel E1000 devices the blob
> >> is 360KB (356KB structs and 20KB of strings), building such a tree takes
> >> ~2s on a POWER8 box. A simple tree with 1 CPU and a couple of devices
> >> takes 38ms and creates 16KB blob.
> >>
> >> This preloads strings with 40 property names from CPU and PCI device nodes
> >> and the strings lookup only searches within these. Without string reusing
> >> at all, the strings blob is 200KB and rendering time is 1.7sec; with
> >> unlimited reusing, the strings blob is 4KB and rendering time is 2.8sec.
> >>
> >> While we are here, fix the version handling in fdt-init. It only matters
> >> a little for the fdt-debug==1 case though.
> >>
> >> Signed-off-by: Alexey Kardashevskiy <aik at ozlabs.ru>
> >> ---
> >>
> >> Changes:
> >> v3:
> >> * fixed stack handling after hcall returned
> >> * fixed format versions in both rendering and parsing paths
> >> * rebased on top of removed unused hvcalls
> >> * renamed used variables to have fdtfl- prefixes as there are already
> >> some for parsing the initial dt
> >>  
> > 
> > Yeah and this was confusing CAS because ibm,client-architecture-support
> > uses fdt-struct, but wasn't accessing the right one... it took me some
> > time to understand what was happening :-\
> > 
> > Maybe we should have word in fdt.fs to avoid using fdt-struct in some
> > other file ?  
> 
> This would not help - these variables are global.
> 

They do have global scope indeed, but it doesn't mean they necessarily have
to be used as such... 


> 



More information about the SLOF mailing list