[Skiboot] [PATCH] fast-reboot: abort fast reboot if CAPP attached
Andrew Donnellan
andrew.donnellan at au1.ibm.com
Wed Oct 19 15:07:48 AEDT 2016
If a PHB is in CAPI mode, we cannot safely fast reboot - the PHB will be
fenced during the reboot resulting in major problems when we load the new
kernel.
In order to handle this safely, we need to disable CAPI mode before
resetting PHBs during the fast reboot. However, we don't currently support
this.
In the meantime, when fast rebooting, check if there are any PHBs with a
CAPP attached, and if so, abort the fast reboot and revert to a normal
reboot instead.
Signed-off-by: Andrew Donnellan <andrew.donnellan at au1.ibm.com>
---
Lightly tested. I'm still reworking my patch to disable the CAPP properly
during a PHB creset which will render this unneccessary.
---
core/fast-reboot.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/core/fast-reboot.c b/core/fast-reboot.c
index 37744b8..66b3182 100644
--- a/core/fast-reboot.c
+++ b/core/fast-reboot.c
@@ -279,11 +279,13 @@ static bool fast_reset_p8(void)
}
extern void *fdt;
+extern struct lock capi_lock;
void fast_reboot(void)
{
bool success;
static int fast_reboot_count = 0;
+ struct proc_chip *chip;
if (proc_gen != proc_gen_p8) {
prlog(PR_DEBUG,
@@ -296,6 +298,17 @@ void fast_reboot(void)
return;
}
+ lock(&capi_lock);
+ for_each_chip(chip) {
+ if (chip->capp_phb3_attached_mask) {
+ prlog(PR_NOTICE,
+ "RESET: CAPP attached, cannot fast reboot\n");
+ unlock(&capi_lock);
+ return;
+ }
+ }
+ unlock(&capi_lock);
+
prlog(PR_NOTICE, "RESET: Initiating fast reboot %d...\n", ++fast_reboot_count);
free(fdt);
--
Andrew Donnellan OzLabs, ADL Canberra
andrew.donnellan at au1.ibm.com IBM Australia Limited
More information about the Skiboot
mailing list