[Skiboot] [RFC/WIP/PATCH v2] Fast reboot for P8

Benjamin Herrenschmidt benh at kernel.crashing.org
Thu Jul 28 22:42:55 AEST 2016


On Thu, 2016-07-28 at 16:24 +1000, Michael Neuling wrote:
> 
> > 
> > diff --git a/core/init.c b/core/init.c
> > index ca3ad55..1a3d741 100644
> > --- a/core/init.c
> > +++ b/core/init.c
> > @@ -287,7 +287,7 @@ extern uint64_t boot_offset;
> >  static size_t kernel_size;
> >  static size_t initramfs_size;
> >  
> > -static bool start_preload_kernel(void)
> > +bool start_preload_kernel(void)
> >  {
> > > >  	int loaded;
> >  
> > @@ -384,6 +384,9 @@ static void load_initramfs(void)
> >  {
> > > >  	int loaded;
> >  
> > > > +	dt_check_del_prop(dt_chosen, "linux,initrd-start");
> > > > +	dt_check_del_prop(dt_chosen, "linux,initrd-end");
> 
> When applying this patch, I can no longer pass into skiboot an initrd that
> is passed through to linux.  The linux,initrd-start/end properties are
> deleted.
> 
> I think this hunk is causing the problem.

Hrm ok so we need to move that to right before we try to create
new ones then. Otherwise we hit an assert when trying to create
duplicates in the case where we load it from PNOR.

> > +
> > > >  	loaded = wait_for_resource_loaded(RESOURCE_ID_INITRAMFS,
> > > >  					  RESOURCE_SUBID_NONE);
> >  
> > @@ -447,6 +450,7 @@ void __noreturn load_and_boot_kernel(bool is_reboot)
> >  
> > > >  	/* Set kernel command line argument if specified */
> >  #ifdef KERNEL_COMMAND_LINE
> > > > +	dt_check_del_prop(dt_chosen, "bootargs");
> 
> I assume this will cause similar issues for bootargs.

Well, this is inside an ifdef where we are about to replace them anyway,
we just need to clear first. If you already had bootargs that would have
crashed at that point.

Cheers,
Ben.



More information about the Skiboot mailing list