From patchwork Tue Jun 18 07:29:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stewart Smith X-Patchwork-Id: 1117663 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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45Sfv845VSz9s4V for ; Tue, 18 Jun 2019 17:33:08 +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 45Sfv602VdzDqJh for ; Tue, 18 Jun 2019 17:33:06 +1000 (AEST) 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.158.5; 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 (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 45Sfq72RNMzDqbr for ; Tue, 18 Jun 2019 17:29:39 +1000 (AEST) Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5I7SXYK141685 for ; Tue, 18 Jun 2019 03:29:36 -0400 Received: from e31.co.us.ibm.com (e31.co.us.ibm.com [32.97.110.149]) by mx0b-001b2d01.pphosted.com with ESMTP id 2t6rxxncqv-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 18 Jun 2019 03:29:36 -0400 Received: from localhost by e31.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 18 Jun 2019 08:29:35 +0100 Received: from b03cxnp08028.gho.boulder.ibm.com (9.17.130.20) by e31.co.us.ibm.com (192.168.1.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 18 Jun 2019 08:29:33 +0100 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp08028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x5I7TW0N29491502 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 18 Jun 2019 07:29:32 GMT Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 967A7C6057 for ; Tue, 18 Jun 2019 07:29:32 +0000 (GMT) Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5F4CAC605A for ; Tue, 18 Jun 2019 07:29:32 +0000 (GMT) Received: from birb.localdomain (unknown [9.185.142.124]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTP for ; Tue, 18 Jun 2019 07:29:32 +0000 (GMT) Received: by birb.localdomain (Postfix, from userid 1000) id 60BC250D300; Tue, 18 Jun 2019 17:29:28 +1000 (AEST) From: Stewart Smith To: skiboot@lists.ozlabs.org Date: Tue, 18 Jun 2019 17:29:17 +1000 X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190618072925.5299-1-stewart@linux.ibm.com> References: <20190618072925.5299-1-stewart@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 19061807-8235-0000-0000-00000EAA025B X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00011283; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000286; SDB=6.01219633; UDB=6.00641533; IPR=6.01000774; MB=3.00027356; MTD=3.00000008; XFM=3.00000015; UTC=2019-06-18 07:29:34 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19061807-8236-0000-0000-0000460F1B7F Message-Id: <20190618072925.5299-10-stewart@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-06-18_04:, , 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=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906180062 Subject: [Skiboot] [PATCH 09/17] core/opal: move HIR trigger to FSP poller X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Signed-off-by: Stewart Smith --- core/opal.c | 14 -------------- hw/fsp/fsp.c | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/core/opal.c b/core/opal.c index 3a2fbb95b05d..650811642590 100644 --- a/core/opal.c +++ b/core/opal.c @@ -53,12 +53,6 @@ static uint64_t opal_dynamic_events; extern uint32_t attn_trigger; extern uint32_t hir_trigger; -/* We make this look like a Surveillance error, even though it really - * isn't one. - */ -DEFINE_LOG_ENTRY(OPAL_INJECTED_HIR, OPAL_MISC_ERR_EVT, OPAL_SURVEILLANCE, - OPAL_SURVEILLANCE_ERR, OPAL_PREDICTIVE_ERR_GENERAL, - OPAL_MISCELLANEOUS_INFO_ONLY); void opal_table_init(void) { @@ -637,14 +631,6 @@ static int64_t opal_poll_events(__be64 *outstanding_event_mask) assert(false); } - /* Test the host initiated reset */ - if (hir_trigger == 0xdeadbeef) { - uint32_t plid = log_simple_error(&e_info(OPAL_INJECTED_HIR), - "SURV: Injected HIR, initiating FSP R/R\n"); - fsp_trigger_reset(plid); - hir_trigger = 0; - } - opal_run_pollers(); if (outstanding_event_mask) diff --git a/hw/fsp/fsp.c b/hw/fsp/fsp.c index aa393c719cd4..4415ab5a5952 100644 --- a/hw/fsp/fsp.c +++ b/hw/fsp/fsp.c @@ -38,6 +38,8 @@ #include #include +extern uint32_t hir_trigger; + DEFINE_LOG_ENTRY(OPAL_RC_FSP_POLL_TIMEOUT, OPAL_PLATFORM_ERR_EVT, OPAL_FSP, OPAL_PLATFORM_FIRMWARE, OPAL_RECOVERED_ERR_GENERAL, OPAL_NA); @@ -47,6 +49,13 @@ DEFINE_LOG_ENTRY(OPAL_RC_FSP_MBOX_ERR, OPAL_PLATFORM_ERR_EVT, OPAL_FSP, DEFINE_LOG_ENTRY(OPAL_RC_FSP_DISR_HIR_MASK, OPAL_PLATFORM_ERR_EVT, OPAL_FSP, OPAL_PLATFORM_FIRMWARE, OPAL_RECOVERED_ERR_GENERAL, OPAL_NA); +/* We make this look like a Surveillance error, even though it really + * isn't one. + */ +DEFINE_LOG_ENTRY(OPAL_INJECTED_HIR, OPAL_MISC_ERR_EVT, OPAL_SURVEILLANCE, + OPAL_SURVEILLANCE_ERR, OPAL_PREDICTIVE_ERR_GENERAL, + OPAL_MISCELLANEOUS_INFO_ONLY); + #define FSP_TRACE_MSG #define FSP_TRACE_EVENT @@ -2026,6 +2035,14 @@ static void fsp_create_fsp(struct dt_node *fsp_node) static void fsp_opal_poll(void *data __unused) { + /* Test the host initiated reset */ + if (hir_trigger == 0xdeadbeef) { + uint32_t plid = log_simple_error(&e_info(OPAL_INJECTED_HIR), + "SURV: Injected HIR, initiating FSP R/R\n"); + fsp_trigger_reset(plid); + hir_trigger = 0; + } + if (try_lock(&fsp_lock)) { __fsp_poll(false); unlock(&fsp_lock);