From patchwork Thu Jan 4 11:27:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akshay Adiga X-Patchwork-Id: 855559 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 3zC5CV6D1Gz9sQm for ; Thu, 4 Jan 2018 22:28:38 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3zC5CV4MfGzDqy4 for ; Thu, 4 Jan 2018 22:28:38 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=linux.vnet.ibm.com (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com; envelope-from=akshay.adiga@linux.vnet.ibm.com; receiver=) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (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 3zC5C94VSVzDqpN for ; Thu, 4 Jan 2018 22:28:21 +1100 (AEDT) Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w04BOTqW033718 for ; Thu, 4 Jan 2018 06:28:18 -0500 Received: from e06smtp14.uk.ibm.com (e06smtp14.uk.ibm.com [195.75.94.110]) by mx0a-001b2d01.pphosted.com with ESMTP id 2f9hvvc2vv-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 04 Jan 2018 06:28:18 -0500 Received: from localhost by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 4 Jan 2018 11:28:16 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 4 Jan 2018 11:28:14 -0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w04BSDtO46268574; Thu, 4 Jan 2018 11:28:13 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2666711C054; Thu, 4 Jan 2018 11:22:11 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F299111C050; Thu, 4 Jan 2018 11:22:09 +0000 (GMT) Received: from aksadiga.in.ibm.com (unknown [9.77.193.244]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 4 Jan 2018 11:22:07 +0000 (GMT) From: Akshay Adiga To: skiboot@lists.ozlabs.org Date: Thu, 4 Jan 2018 16:57:57 +0530 X-Mailer: git-send-email 2.5.5 X-TM-AS-GCONF: 00 x-cbid: 18010411-0016-0000-0000-000005139ABC X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18010411-0017-0000-0000-0000284FE6DA Message-Id: <1515065286-8656-1-git-send-email-akshay.adiga@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-01-04_05:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1801040157 Subject: [Skiboot] [PATCH 0/9] p9_stop_api error handling X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Akshay Adiga MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" From: Akshay Adiga This patch series adds error handling for p9_stop_api. Following are the features that the series adds : - stop api calls will only be attempted if there is real reason to do so. - If stop api calls fail at init, deeper states will not be exposed in device tree. - stop api calls will be ignored if it does not have deep states enabled and return sucess. - if stop api fails at run time, all futher calls will be returned as failure without attempting. There are 3 states that a wakeup_engine can have (wakeup_engine_state) : - WAKEUP_ENGINE_NOT_PRESENT : Homer base is not set - WAKEUP_ENGINE_FAILED : stop api returned error sometime in the past. - WAKEUP_ENGINE_PRESENT : Homer base is present and till now stop api has succeeded Discover if stop-enabled-bits has any states that requires wakeup engine. and set it in the global variable : - has_deep_states if ( has_deep_states == false) : - No need to call stop api. else if ( wakeup_engine_state != WAKEUP_ENGINE_PRESENT ) : - Return fail without attempting stop api. else If ( wakeup_engine_state == WAKEUP_ENGINE_PRESENT ) : - Actually call stop api - If it fails, mark wakeup_engine_state = WAKEUP_ENGINE_FAILED if (wakeup_engine_state == WAKEUP_ENGINE_FAILED) before device-tree creation - set has_deep_states = false; - don't add deep states in device-tree. Akshay Adiga (9): SLW: Delay cpuidle device-tree creation SLW: Split init functions SLW: Call slw_late_init_p{8,9} only when has_wakeup_engine is set SLW: Use wakeup_engine state to handle errors in wakeup engine SLW: Move MAMBO simulator checks to slw_init SLW: Detect if deep states are enabled SLW: Call p9_stop_api only if deep_states are enabled SCOM restore for DARN and XIVE SLW: Add p9_stop_api calls for IMC core/opal.c | 1 - hw/imc.c | 40 ++++++++++++++ hw/nx.c | 42 +++++++++++++++ hw/slw.c | 159 ++++++++++++++++++++++++++++++++++-------------------- hw/xive.c | 30 +++++++++++ include/skiboot.h | 13 +++++ 6 files changed, 227 insertions(+), 58 deletions(-)