From patchwork Fri Mar 2 11:12:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vaibhav Jain X-Patchwork-Id: 880440 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zt69H2Hpsz9s3m for ; Fri, 2 Mar 2018 22:13:07 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.vnet.ibm.com Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3zt69H04mbzF1sJ for ; Fri, 2 Mar 2018 22:13:07 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.vnet.ibm.com X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=none (mailfrom) smtp.mailfrom=linux.vnet.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=vaibhav@linux.vnet.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.vnet.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3zt6971FnHzF1sG for ; Fri, 2 Mar 2018 22:12:58 +1100 (AEDT) Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w22BA25w058057 for ; Fri, 2 Mar 2018 06:12:55 -0500 Received: from e06smtp10.uk.ibm.com (e06smtp10.uk.ibm.com [195.75.94.106]) by mx0b-001b2d01.pphosted.com with ESMTP id 2gf3wxkutr-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 02 Mar 2018 06:12:55 -0500 Received: from localhost by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 2 Mar 2018 11:12:53 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp10.uk.ibm.com (192.168.101.140) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 2 Mar 2018 11:12:51 -0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w22BCo2c64684094; Fri, 2 Mar 2018 11:12:50 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 208B44C040; Fri, 2 Mar 2018 11:06:18 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B34C74C044; Fri, 2 Mar 2018 11:06:16 +0000 (GMT) Received: from vajain21.in.ibm.com (unknown [9.124.35.152]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 2 Mar 2018 11:06:16 +0000 (GMT) From: Vaibhav Jain To: Frederic Barrat , Christophe Lombard , Andrew Donnellan Date: Fri, 2 Mar 2018 16:42:46 +0530 X-Mailer: git-send-email 2.14.3 X-TM-AS-GCONF: 00 x-cbid: 18030211-0040-0000-0000-00000419E053 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18030211-0041-0000-0000-0000261CE7B3 Message-Id: <20180302111246.1400-1-vaibhav@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-03-02_06:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1803020131 Subject: [Skiboot] [PATCH] capp: Disable fast-reboot whenever enable_capi_mode() is called X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Philippe Bergheaud , skiboot@lists.ozlabs.org MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" This patch updates phb4_set_capi_mode() to disable fast-reboot whenever enable_capi_mode() is called, irrespective to its return value. This should prevent against a possibility of not disabling fast-reboot when some changes to enable_capi_mode() causing return of an error and leaving CAPP in enabled mode. Suggested-by: Frederic Barrat Signed-off-by: Vaibhav Jain Reviewed-by: Frederic Barrat --- hw/phb4.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/phb4.c b/hw/phb4.c index 8835e3de..47175df2 100644 --- a/hw/phb4.c +++ b/hw/phb4.c @@ -4061,11 +4061,13 @@ static int64_t phb4_set_capi_mode(struct phb *phb, uint64_t mode, ret = enable_capi_mode(p, pe_number, CAPI_DMA_TVT0, CAPP_MAX_STQ_ENGINES | CAPP_MIN_DMA_READ_ENGINES); + disable_fast_reboot("CAPP being enabled"); break; case OPAL_PHB_CAPI_MODE_DMA_TVT1: ret = enable_capi_mode(p, pe_number, CAPI_DMA_TVT1, CAPP_MIN_STQ_ENGINES | CAPP_MAX_DMA_READ_ENGINES); + disable_fast_reboot("CAPP being enabled"); break; case OPAL_PHB_CAPI_MODE_SNOOP_ON: /* nothing to do P9 if CAPP is alreay enabled */ @@ -4079,10 +4081,6 @@ static int64_t phb4_set_capi_mode(struct phb *phb, uint64_t mode, ret = OPAL_UNSUPPORTED; } - /* If CAPP enabled then disable fast-reboot for now */ - if (ret == OPAL_SUCCESS) - disable_fast_reboot("CAPP being enabled"); - return ret; }