From patchwork Wed Sep 28 04:56:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oliver O'Halloran X-Patchwork-Id: 675952 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3skQRt4LCVz9s4x for ; Wed, 28 Sep 2016 14:57:30 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=h4CQPmls; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3skQRt3HWPzDrXR for ; Wed, 28 Sep 2016 14:57:30 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=h4CQPmls; dkim-atps=neutral X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from mail-pa0-x242.google.com (mail-pa0-x242.google.com [IPv6:2607:f8b0:400e:c03::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3skQRB2BGQzDrXG for ; Wed, 28 Sep 2016 14:56:54 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=h4CQPmls; dkim-atps=neutral Received: by mail-pa0-x242.google.com with SMTP id j3so1548145paj.2 for ; Tue, 27 Sep 2016 21:56:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=dAj+Mmhb25UQA2t+Y7kT+Q4NBwfPEQMyZGpP0Zz2iF0=; b=h4CQPmlszJus+tuB7RpPUxOWF5+5hyW9/2GKWNGE1DOx9vS4J+GKRkXM50jXGh/05p D8Efm91gzO8ZyeXKO0e3/sRTagTORhqSQ3AqNVqcM3mcUfnSizd/Dr3t6RqB6Vb1hupe StS7L4fDCVJ2HmBJFj5dfEdmy+BW2zr85E6Mp3HBiL+AASAN2vylaOLkuQI42nyleV7J bxh/lt4qZqZdiaosmn6WGgvb/d527Yyey8keZk2wTzGABB82tp02IA50mlou+Euyc1D6 I/r2zMZW6mgJjtRNdyaqpcczfQCtHpJzz+D8JCmu9knc06pSUCxyabUopL1nhOYbCsFF VALQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=dAj+Mmhb25UQA2t+Y7kT+Q4NBwfPEQMyZGpP0Zz2iF0=; b=NglmTkhcpEsPb0GwuAaM1V/Ag76AYJWBxfmn4QtwkbJSg7X5RSzWzaNa7KfpkhHXAl ERk6Q7fMeciudN99RAAPaTyHY6P9w9B+X4iRa1y7tx3rSualapx19A+daBPiPr2hk1Q9 ftKUEWH3N4V4aDx/SEgTeBE6ZtQIeG3FVigikKQd8hNoqFvbqY/p+Lx0A6StTXzw5wRs ySHuNjsI6gTbF7Ce2id9rylan64DsUnBb0yoPyIcklEeKy6eCF/KaaJ3XUyeJglI4YiN eXQwPOQu29ZYQu2oUMhfYCXuIutUCpnQyAduV7mA5UCniOcdf8O0bpINsJD9rXfMCj0m anDQ== X-Gm-Message-State: AA6/9RlpSYyJ+/H7m+yMx4Usd6vngUrUiJmkc4+2DuH40B28WEaAo+Lcrs0kx/Rk9CqbHA== X-Received: by 10.66.235.10 with SMTP id ui10mr34223201pac.81.1475038612754; Tue, 27 Sep 2016 21:56:52 -0700 (PDT) Received: from canetoad.ozlabs.ibm.com ([122.99.82.10]) by smtp.gmail.com with ESMTPSA id g14sm8433832pfb.77.2016.09.27.21.56.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Sep 2016 21:56:52 -0700 (PDT) From: Oliver O'Halloran To: skiboot@lists.ozlabs.org Date: Wed, 28 Sep 2016 14:56:32 +1000 Message-Id: <1475038592-24094-4-git-send-email-oohall@gmail.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1475038592-24094-1-git-send-email-oohall@gmail.com> References: <1475038592-24094-1-git-send-email-oohall@gmail.com> Subject: [Skiboot] [PATCH 4/4] fast-reboot: Use fast reboot when enabled in NVRAM X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Adds a check for the "fast-reboot" config string. When set to "enabled" Skiboot will handle the OPAL_CEC_REBOOT OPAL call. Signed-off-by: Oliver O'Halloran --- core/platform.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/platform.c b/core/platform.c index 76729141ffac..a213a8313046 100644 --- a/core/platform.c +++ b/core/platform.c @@ -24,6 +24,7 @@ #include #include #include +#include bool manufacturing_mode = false; struct platform platform; @@ -54,10 +55,10 @@ static int64_t opal_cec_reboot(void) console_complete_flush(); -#ifdef ENABLE_FAST_RESET /* Try a fast reset first */ - fast_reset(); -#endif + if (nvram_query_eq("fast-reboot", "enabled")) + fast_reset(); + if (platform.cec_reboot) return platform.cec_reboot();