[Cbe-oss-dev] [PATCH] fix reboot fail on kexec for CBE

Akira Tsukamoto akirat at rd.scei.sony.co.jp
Wed Apr 4 11:45:01 EST 2007


> 
> Thanks for the Information! Is this patch actually sufficient in that
> it enables kexec to work as expected, or did you need additional changes
> beyond it?

In our usage of our cell blades does not require additional changes to 
boot second kernel after kexec.


> > ---------------------------------------------------------------
> > diff -uprNX dontdiff linux-2.6.20.4-arnd3/arch/powerpc/kernel/head_64.S linux-2.6.20.4-arnd3-aki1/arch/powerpc/kernel/head_64.S
> > --- linux-2.6.20.4-arnd3/arch/powerpc/kernel/head_64.S	2007-03-30 17:13:53.000000000 +0900
> > +++ linux-2.6.20.4-arnd3-aki1/arch/powerpc/kernel/head_64.S	2007-03-30 18:54:51.000000000 +0900
> > @@ -2010,6 +2010,9 @@ _STATIC(start_here_multiplatform)
> >  	mr	r3,r31
> >   	bl	.early_setup
> >  
> > +#if defined(CONFIG_PPC_CELL) && defined(CONFIG_CRASH_DUMP)
> > +	bl	.cbe_flush_tlb
> > +#endif
> >  	LOAD_REG_IMMEDIATE(r3, .start_here_common)
> >  	LOAD_REG_IMMEDIATE(r4, MSR_KERNEL)
> >  	mtspr	SPRN_SRR0,r3
> 
> This looks wrong, the function is called on all platforms, if
> support for cell is compiled in. Since CONFIG_PPC_CELL is set on
> the PS3, it is even active there.

Oh, I thought CONFIG_PPC_CELL was only set for CBE. I need to fix it.


> 
> But the SPRs you are touching are CPU specific. Writing into them when a
> hypervisor is enabled or when running on a different CPU altogether
> probably leads to a nasty exception.
> 
> I think it should instead be done from the ->cpu_setup function in
> identify_cpu(). Can you try if that works?

Thanks,
This patch existed nearly a month internally in SCE and I do realize that 
it is a dirty hack, but never had a chance to clean it up, since other 
higher priority tasks were keep kicking in on to me. I just need a 
block of time to work on it.


> A better alternative might be to flush the TLBs from the old kernel
> before calling into the new one, at least that's how I'd expect kexec
> to work.

I will try this approach.

Akira

-- 
Akira Tsukamoto
Sony Computer Entertainment Inc. 
Computer Development Div. Distributed OS Development Dept. 
Japan




More information about the cbe-oss-dev mailing list