aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Donnellan <andrew.donnellan@au1.ibm.com>2016-10-19 15:07:48 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-10-24 11:54:40 +1100
commit60f7216c7d397dd93a8b736fffd385fa067fe1da (patch)
tree82b6169995cf552f465e77c5b6e992ed9a922866
parent831971690ca92c93ccbf07c774202070f56834ad (diff)
downloadskiboot-60f7216c7d397dd93a8b736fffd385fa067fe1da.zip
skiboot-60f7216c7d397dd93a8b736fffd385fa067fe1da.tar.gz
skiboot-60f7216c7d397dd93a8b736fffd385fa067fe1da.tar.bz2
fast-reboot: abort fast reboot if CAPP attached
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@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r--core/fast-reboot.c13
1 files changed, 13 insertions, 0 deletions
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);