From patchwork Fri Jun 8 04:46:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stewart Smith X-Patchwork-Id: 926585 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4128zg2jsNz9s1B for ; Fri, 8 Jun 2018 14:47:59 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4128zg1GhPzF36G for ; Fri, 8 Jun 2018 14:47:59 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=linux.ibm.com (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com; envelope-from=stewart@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com 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 4128xt4xqQzF36m for ; Fri, 8 Jun 2018 14:46:26 +1000 (AEST) Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w584iAD9120920 for ; Fri, 8 Jun 2018 00:46:24 -0400 Received: from e15.ny.us.ibm.com (e15.ny.us.ibm.com [129.33.205.205]) by mx0a-001b2d01.pphosted.com with ESMTP id 2jfes50f4e-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 08 Jun 2018 00:46:24 -0400 Received: from localhost by e15.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 8 Jun 2018 00:46:22 -0400 Received: from b01cxnp22035.gho.pok.ibm.com (9.57.198.25) by e15.ny.us.ibm.com (146.89.104.202) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 8 Jun 2018 00:46:20 -0400 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w584kJ4g7078428 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 8 Jun 2018 04:46:19 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F30C8AC041 for ; Fri, 8 Jun 2018 00:47:43 -0400 (EDT) Received: from birb.localdomain (unknown [9.81.212.251]) by b01ledav006.gho.pok.ibm.com (Postfix) with SMTP id 755DAAC048 for ; Fri, 8 Jun 2018 00:47:43 -0400 (EDT) Received: by birb.localdomain (Postfix, from userid 1000) id 8D4FB4EC62C; Fri, 8 Jun 2018 14:46:17 +1000 (AEST) From: Stewart Smith To: skiboot@lists.ozlabs.org Date: Fri, 8 Jun 2018 14:46:17 +1000 X-Mailer: git-send-email 2.17.1 X-TM-AS-GCONF: 00 x-cbid: 18060804-0068-0000-0000-00000305452C X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009149; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000265; SDB=6.01043812; UDB=6.00534464; IPR=6.00822882; MB=3.00021523; MTD=3.00000008; XFM=3.00000015; UTC=2018-06-08 04:46:21 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18060804-0069-0000-0000-0000449BED96 Message-Id: <20180608044617.30334-1-stewart@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-06-08_02:, , 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=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=466 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1806080051 Subject: [Skiboot] [PATCH] ipmi-sel: use opal_booting() over poking at debug descriptor 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: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Signed-off-by: Stewart Smith --- hw/ipmi/ipmi-sel.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/ipmi/ipmi-sel.c b/hw/ipmi/ipmi-sel.c index 338685414153..466fcb2608d8 100644 --- a/hw/ipmi/ipmi-sel.c +++ b/hw/ipmi/ipmi-sel.c @@ -504,8 +504,7 @@ static void sel_power(uint8_t power) switch (power) { case SOFT_OFF: prlog(PR_NOTICE, "Soft shutdown requested\n"); - if (!(debug_descriptor.state_flags & OPAL_BOOT_COMPLETE) && - platform.cec_power_down) { + if (opal_booting() && platform.cec_power_down) { prlog(PR_NOTICE, "Host not up, shutting down now\n"); platform.cec_power_down(IPMI_CHASSIS_PWR_DOWN); } else { @@ -515,8 +514,7 @@ static void sel_power(uint8_t power) break; case SOFT_REBOOT: prlog(PR_NOTICE, "Soft reboot requested\n"); - if (!(debug_descriptor.state_flags & OPAL_BOOT_COMPLETE) && - platform.cec_reboot) { + if (opal_booting() && platform.cec_reboot) { prlog(PR_NOTICE, "Host not up, rebooting now\n"); platform.cec_reboot(); } else {