From patchwork Thu Feb 5 12:18:36 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: 436763 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 1CCB414027C for ; Thu, 5 Feb 2015 23:17:39 +1100 (AEDT) Received: from ozlabs.org (ozlabs.org [103.22.144.67]) by lists.ozlabs.org (Postfix) with ESMTP id 09A3A1A0EEB for ; Thu, 5 Feb 2015 23:17:39 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from e28smtp05.in.ibm.com (e28smtp05.in.ibm.com [122.248.162.5]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 80C1C1A0E5B for ; Thu, 5 Feb 2015 23:17:34 +1100 (AEDT) Received: from /spool/local by e28smtp05.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 5 Feb 2015 17:47:30 +0530 Received: from d28dlp02.in.ibm.com (9.184.220.127) by e28smtp05.in.ibm.com (192.168.1.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 5 Feb 2015 17:47:28 +0530 Received: from d28relay03.in.ibm.com (d28relay03.in.ibm.com [9.184.220.60]) by d28dlp02.in.ibm.com (Postfix) with ESMTP id 5C25F394005C for ; Thu, 5 Feb 2015 17:47:28 +0530 (IST) Received: from d28av04.in.ibm.com (d28av04.in.ibm.com [9.184.220.66]) by d28relay03.in.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t15CHRGA7733476 for ; Thu, 5 Feb 2015 17:47:27 +0530 Received: from d28av04.in.ibm.com (localhost [127.0.0.1]) by d28av04.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t15CHRhx017871 for ; Thu, 5 Feb 2015 17:47:27 +0530 Received: from thinktux.in.ibm.com ([9.79.218.213]) by d28av04.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t15CHRjN017828 for ; Thu, 5 Feb 2015 17:47:27 +0530 To: skiboot@lists.ozlabs.org From: Ananth N Mavinakayanahalli Date: Thu, 05 Feb 2015 17:48:36 +0530 Message-ID: <20150205121836.32018.47540.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: 15020512-0017-0000-0000-00000393F976 Subject: [Skiboot] [PATCH] 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. Signed-off-by: Ananth N Mavinakayanahalli Tested-by: Vasant Hegde --- hw/psi.c | 10 +++++++--- include/errorlog.h | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/hw/psi.c b/hw/psi.c index 70403fd..0d68e2c 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,8 @@ 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"); } /* 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,