From patchwork Mon Aug 10 05:46:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasant Hegde X-Patchwork-Id: 505518 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 3A421140187 for ; Mon, 10 Aug 2015 15:47:55 +1000 (AEST) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 1F6B91A0CB4 for ; Mon, 10 Aug 2015 15:47:55 +1000 (AEST) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from e23smtp07.au.ibm.com (e23smtp07.au.ibm.com [202.81.31.140]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 7741E1A02DF for ; Mon, 10 Aug 2015 15:47:52 +1000 (AEST) Received: from /spool/local by e23smtp07.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 10 Aug 2015 15:47:51 +1000 Received: from d23dlp02.au.ibm.com (202.81.31.213) by e23smtp07.au.ibm.com (202.81.31.204) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 10 Aug 2015 15:47:48 +1000 X-Helo: d23dlp02.au.ibm.com X-MailFrom: hegdevasant@linux.vnet.ibm.com X-RcptTo: skiboot@lists.ozlabs.org Received: from d23relay06.au.ibm.com (d23relay06.au.ibm.com [9.185.63.219]) by d23dlp02.au.ibm.com (Postfix) with ESMTP id E7EA52BB0059 for ; Mon, 10 Aug 2015 15:47:47 +1000 (EST) Received: from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.235.138]) by d23relay06.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t7A5lccQ47972494 for ; Mon, 10 Aug 2015 15:47:46 +1000 Received: from d23av02.au.ibm.com (localhost [127.0.0.1]) by d23av02.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t7A5lF4K025371 for ; Mon, 10 Aug 2015 15:47:15 +1000 Received: from hegdevasant.in.ibm.com (hegdevasant.in.ibm.com [9.124.35.172]) by d23av02.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t7A5lDj8024834; Mon, 10 Aug 2015 15:47:13 +1000 From: Vasant Hegde To: skiboot@lists.ozlabs.org Date: Mon, 10 Aug 2015 11:16:43 +0530 Message-Id: <1439185603-27191-1-git-send-email-hegdevasant@linux.vnet.ibm.com> X-Mailer: git-send-email 2.1.0 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15081005-0025-0000-0000-000001F4657B Subject: [Skiboot] [PATCH v2] IPMI: Only log events that needs attention X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alistair Popple MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Presently we are logging all the events to service processor (FSP/BMC). But on BMC machines we should only log events that requires attention. As per PEL spec, we should log events with severity >= 0x22 and "service action flag" is "on". But in our case, all logs OPAL originagted logs are makred as report externally. So lets log all events that are originated from OAPL (presently all logs as payload is not logging any PEL event) and severity >= 0x22. Signed-off-by: Vasant Hegde Cc: Ananth N Mavinakayanahalli Cc: Alistair Popple Cc: Jeremy Kerr --- hw/ipmi/ipmi-sel.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hw/ipmi/ipmi-sel.c b/hw/ipmi/ipmi-sel.c index f03f19e..fde1fee 100644 --- a/hw/ipmi/ipmi-sel.c +++ b/hw/ipmi/ipmi-sel.c @@ -268,6 +268,13 @@ int ipmi_elog_commit(struct errorlog *elog_buf) { struct ipmi_msg *msg; + /* Only log events that needs attention */ + if (elog_buf->event_severity < OPAL_PREDICTIVE_ERR_FAULT_RECTIFY_REBOOT || + elog_buf->elog_origin != ORG_SAPPHIRE) { + prlog(PR_INFO, "SEL: dropping non severe PEL event\n"); + return 0; + } + /* We pass a large request size in to mkmsg so that we have a * large enough allocation to reuse the message to pass the * PEL data via a series of partial add commands. */