• Ingo Molnar's avatar
    x86: Remove the PCI reboot method from the default chain · 5be44a6f
    Ingo Molnar authored
    Steve reported a reboot hang and bisected it back to this commit:
    
      a4f1987e x86, reboot: Add EFI and CF9 reboot methods into the default list
    
    He heroically tested all reboot methods and found the following:
    
      reboot=t       # triple fault                  ok
      reboot=k       # keyboard ctrl                 FAIL
      reboot=b       # BIOS                          ok
      reboot=a       # ACPI                          FAIL
      reboot=e       # EFI                           FAIL   [system has no EFI]
      reboot=p       # PCI 0xcf9                     FAIL
    
    And I think it's pretty obvious that we should only try PCI 0xcf9 as a
    last resort - if at all.
    
    The other observation is that (on this box) we should never try
    the PCI reboot method, but close with either the 'triple fault'
    or the 'BIOS' (terminal!) reboot methods.
    
    Thirdly, CF9_COND is a total misnomer - it should be something like
    CF9_SAFE or CF9_CAREFUL, and 'CF9' should be 'CF9_FORCE' ...
    
    So this patch fixes the worst problems:
    
     - it orders the actual reboot logic to follow the reboot ordering
       pattern - it was in a pretty random order before for no good
       reason.
    
     - it fixes the CF9 misnomers and uses BOOT_CF9_FORCE and
       BOOT_CF9_SAFE flags to make the code more obvious.
    
     - it tries the BIOS reboot method before the PCI reboot method.
       (Since 'BIOS' is a terminal reboot method resulting in a hang
        if it does not work, this is essentially equivalent to removing
        the PCI reboot method from the default reboot chain.)
    
     - just for the miraculous possibility of terminal (resulting
       in hang) reboot methods of triple fault or BIOS returning
       without having done their job, there's an ordering between
       them as well.
    Reported-and-bisected-and-tested-by: default avatarSteven Rostedt <rostedt@goodmis.org>
    Cc: Li Aubrey <aubrey.li@linux.intel.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Matthew Garrett <mjg59@srcf.ucam.org>
    Link: http://lkml.kernel.org/r/20140404064120.GB11877@gmail.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
    5be44a6f
reboot.c 19.1 KB