[Skiboot] [PATCH v2] IPMI: Only log events that needs attention

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Mon Aug 10 15:46:43 AEST 2015


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 <hegdevasant at linux.vnet.ibm.com>
Cc: Ananth N Mavinakayanahalli <ananth at in.ibm.com>
Cc: Alistair Popple <alistair at popple.id.au>
Cc: Jeremy Kerr <jk at ozlabs.org>
---
 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.  */
-- 
2.1.0



More information about the Skiboot mailing list