From patchwork Fri Feb 6 02:54:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ananth N Mavinakayanahalli X-Patchwork-Id: 436990 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 AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 86656140168 for ; Fri, 6 Feb 2015 13:54:05 +1100 (AEDT) Received: from ozlabs.org (ozlabs.org [103.22.144.67]) by lists.ozlabs.org (Postfix) with ESMTP id 6D6AE1A0572 for ; Fri, 6 Feb 2015 13:54:05 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from e23smtp01.au.ibm.com (e23smtp01.au.ibm.com [202.81.31.143]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 0A2FC1A047E for ; Fri, 6 Feb 2015 13:54:01 +1100 (AEDT) Received: from /spool/local by e23smtp01.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 6 Feb 2015 12:54:00 +1000 Received: from d23dlp01.au.ibm.com (202.81.31.203) by e23smtp01.au.ibm.com (202.81.31.207) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 6 Feb 2015 12:53:58 +1000 Received: from d23relay10.au.ibm.com (d23relay10.au.ibm.com [9.190.26.77]) by d23dlp01.au.ibm.com (Postfix) with ESMTP id 20E1C2CE8055 for ; Fri, 6 Feb 2015 13:53:58 +1100 (EST) Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay10.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t162rnCH18088018 for ; Fri, 6 Feb 2015 13:53:58 +1100 Received: from d23av03.au.ibm.com (localhost [127.0.0.1]) by d23av03.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t162rOhU006597 for ; Fri, 6 Feb 2015 13:53:24 +1100 Received: from thinktux.in.ibm.com ([9.79.205.53]) by d23av03.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t162rNR7006107 for ; Fri, 6 Feb 2015 13:53:23 +1100 To: skiboot@lists.ozlabs.org From: Ananth N Mavinakayanahalli Date: Fri, 06 Feb 2015 08:24:17 +0530 Message-ID: <20150206025417.21378.22759.stgit@thinktux.in.ibm.com> User-Agent: StGit/0.16 MIME-Version: 1.0 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15020602-1618-0000-0000-00000190B5C7 Subject: [Skiboot] [PATCH V2 1/2] PSI: Report a PEL for PSI timeout X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.18 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" We currently just log an error when we don't find an active PSI link 15 minutes after it went down. Add a PEL log, with sufficient severity so it gets pushed to the administrator. V2: Reset the timeout correctly to prevent error log flooding. Signed-off-by: Ananth N Mavinakayanahalli Tested-by: Vasant Hegde --- hw/psi.c | 12 +++++++++--- include/errorlog.h | 1 + 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/hw/psi.c b/hw/psi.c index 70403fd..b4804ff 100644 --- a/hw/psi.c +++ b/hw/psi.c @@ -31,6 +31,7 @@ #include #include #include +#include static LIST_HEAD(psis); static u64 psi_link_timer; @@ -43,6 +44,10 @@ static void psi_activate_phb(struct psi *psi); static struct lock psi_lock = LOCK_UNLOCKED; +DEFINE_LOG_ENTRY(OPAL_RC_PSI_TIMEOUT, OPAL_PLATFORM_ERR_EVT, OPAL_PSI, + OPAL_PLATFORM_FIRMWARE, + OPAL_UNRECOVERABLE_ERR_LOSS_OF_FUNCTION, OPAL_NA, NULL); + void psi_set_link_polling(bool active) { printf("PSI: %sing link polling\n", @@ -200,9 +205,10 @@ static void psi_link_poll(void *data __unused) now + secs_to_tb(PSI_LINK_RECOVERY_TIMEOUT); if (tb_compare(now, psi_link_timeout) == TB_AAFTERB) { - prerror("PSI: Timed out looking for a PSI link\n"); - - /* Log error to the host from here */ + log_simple_error(&e_info(OPAL_RC_PSI_TIMEOUT), + "PSI: Link timeout -- loss of FSP\n"); + /* Reset the link timeout and continue looking */ + psi_link_timeout = 0; } /* Poll every 10 seconds */ diff --git a/include/errorlog.h b/include/errorlog.h index 7879b7b..1bcc03e 100644 --- a/include/errorlog.h +++ b/include/errorlog.h @@ -268,6 +268,7 @@ enum opal_reasoncode { /* PSI */ OPAL_RC_PSI_INIT = OPAL_PS | 0x10, OPAL_RC_PSI_IRQ_RESET = OPAL_PS | 0x11, + OPAL_RC_PSI_TIMEOUT = OPAL_PS | 0X12, /* XSCOM */ OPAL_RC_XSCOM_RW = OPAL_XS | 0x10, OPAL_RC_XSCOM_INDIRECT_RW = OPAL_XS | 0x11,