[Skiboot] [PATCH] [v3] Fast reboot for P8

Stewart Smith stewart at linux.vnet.ibm.com
Mon Oct 17 10:53:55 AEDT 2016


Benjamin Herrenschmidt <benh at kernel.crashing.org> writes:
> This is an experimental patch that implements "Fast reboot" on P8
> machines.
>
> The basic idea is that when the OS calls OPAL reboot, we gather all
> the threads in the system using a combination of patching the reset
> vector and soft-resetting them, then cleanup a few bits of hardware
> (we do re-probe PCIe for example), and reload & restart the bootloader.
>
> This is very experimental and needs a lot of testing and also auditing
> code for other bits of HW that might need to be cleaned up. I also need
> to check if we are properly PERST'ing PCI devices.
>
> I've successfully fast rebooted a Habanero a few times.
>
> This is partially based on old code I had to do that on P7. I only
> support it on P8 though as there are issues with the PSI interrupts
> on P7 that cannot be reliably solved.
>
> Not-yet-signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
> ---
>
> v2. Properly cleanup the TLB
>     Handle when OS had cores in fast sleep (restore TB and undo workaround)
>     Untested attempt at dealing with split cores (unsplit them)
>     Additional cleanups
>
> v3. Rebased on top of the NAP series
>     More random fixes I didn't keep track off
>
> TODO: We need to disable fast reboot under some circumstances:
>
>   - When something checkstopped (NPU, NX, ...), we should check FIRs
>
>   - When CAPI is enabled on a PHB since we can't currently switch
>     it back to normal PCI and Linux won't deal with a PHB coming
>     up already iN CAPI mode
>
>   - Split the patch more
> ---
>  asm/head.S           | 122 ++++++------
>  core/fast-reboot.c   | 521 +++++++++++++++++++++++++++++++++------------------
>  core/init.c          |   8 +-
>  core/lock.c          |   3 +
>  core/pci.c           |  12 +-
>  core/platform.c      |   4 +-
>  hw/fsp/fsp-console.c |   5 +
>  hw/fsp/fsp-leds.c    |   3 +
>  hw/occ.c             |   5 +
>  hw/psi.c             |  98 ++++------
>  hw/slw.c             |   7 +-
>  include/config.h     |   2 +-
>  include/cpu.h        |   1 +
>  include/processor.h  |   1 +
>  include/skiboot.h    |   9 +-
>  15 files changed, 494 insertions(+), 307 deletions(-)

As discussed extensively around the place, merged to master as of
0279d8951ead549fdebce93130a2f6c673081862 with a bunch of the changes we
talked about, and hiding it behind a skiboot NVRAM config option (at
least for now).

I'm promised CAPI patches from Andrew too, so it is possible we enable
this by default at some point :)

-- 
Stewart Smith
OPAL Architect, IBM.



More information about the Skiboot mailing list