]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/powernv: Make possible for user to force a full ipl cec reboot
authorVaibhav Jain <vaibhav@linux.ibm.com>
Fri, 7 Sep 2018 07:34:48 +0000 (13:04 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 3 Oct 2018 05:39:45 +0000 (15:39 +1000)
commitd7e7cdd3b5a409d4ce75cec2d91678322366edd1
tree21eb5e5d1f974e7f9448d6b98ebb25b7b10cb4b7
parentbad1dea2f67fcbe47f4ab30c39b8fa037f33f04f
powerpc/powernv: Make possible for user to force a full ipl cec reboot

Ever since fast reboot is enabled by default in opal,
opal_cec_reboot() will use fast-reset instead of full IPL to perform
system reboot. This leaves the user with no direct way to force a full
IPL reboot except changing an nvram setting that persistently disables
fast-reset for all subsequent reboots.

This patch provides a more direct way for the user to force a one-shot
full IPL reboot by passing the command line argument 'full' to the
reboot command. So the user will be able to tweak the reboot behavior
via:

  $ sudo reboot full # Force a full ipl reboot skipping fast-reset

  or
  $ sudo reboot   # default reboot path (usually fast-reset)

The reboot command passes the un-parsed command argument to the kernel
via the 'Reboot' syscall which is then passed on to the arch function
pnv_restart(). The patch updates pnv_restart() to handle this cmd-arg
and issues opal_cec_reboot2 with OPAL_REBOOT_FULL_IPL to force a full
IPL reset.

Signed-off-by: Vaibhav Jain <vaibhav@linux.ibm.com>
Acked-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/opal-api.h
arch/powerpc/platforms/powernv/setup.c