On Fri, 01 Sep 2017 19:39:41 +1000 Michael Ellerman <m...@ellerman.id.au> wrote:
> Nicholas Piggin <npig...@gmail.com> writes: > > > On Wed, 30 Aug 2017 21:25:59 +1000 > > Michael Ellerman <m...@ellerman.id.au> wrote: > > > >> Nicholas Piggin <npig...@gmail.com> writes: > >> > >> > When stop is executed with EC=ESL=0, it appears to execute like a > >> > normal instruction (resuming from NIP when woken by interrupt). > >> > So all the save/restore handling can be avoided completely. In > >> > particular NV GPRs do not have to be saved, and MSR does not have > >> > to be switched back to kernel MSR. > >> > > >> > So move the test for "lite" sleep states out to power9_idle_stop. > >> > > >> > Reviewed-by: Gautham R. Shenoy <e...@linux.vnet.ibm.com> > >> > Signed-off-by: Nicholas Piggin <npig...@gmail.com> > >> > --- > >> > arch/powerpc/kernel/idle_book3s.S | 35 > >> > ++++++++++++++++++++++++----------- > >> > 1 file changed, 24 insertions(+), 11 deletions(-) > >> > >> This is blowing up for me on mambo: > > > > Oh this is a known bug in mambo that does not match the hardware. > > > > You need >= Mambo.7.8.21, or this firmware patch to work around > > the issue for old mambos. > > As discussed elsewhere this still breaks on new mambo with more than one > CPU. So I've dropped it for now. This now seems to be properly fixed in mambo with commit 11783550ee11. Skiboot also has a patch merged which disables the problematic state on mambo so older versions won't crash. d2a24406a49 ("idle: disable stop*_lite POWER9 idle states for Mambo platform") So this could be re-applied now. Thanks, Nick