aboutsummaryrefslogtreecommitdiff
path: root/hw/fsp/fsp-epow.c
diff options
context:
space:
mode:
authorAnshuman Khandual <khandual@linux.vnet.ibm.com>2014-07-31 16:11:35 +0530
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-08-01 16:02:26 +1000
commit23a5e3fb577965b42c2c7f2ed113f5f92b9a3a46 (patch)
treeed62f848fd031f3aa4bb51fa38c8390af8584d17 /hw/fsp/fsp-epow.c
parent7f73dfca263e8797091482cf06b38215e59899b3 (diff)
downloadskiboot-23a5e3fb577965b42c2c7f2ed113f5f92b9a3a46.zip
skiboot-23a5e3fb577965b42c2c7f2ed113f5f92b9a3a46.tar.gz
skiboot-23a5e3fb577965b42c2c7f2ed113f5f92b9a3a46.tar.bz2
epow: Change the logging of the FSP async messages
Right now, all the FSP initiated EPOW messages get logged. SPCN configuration change message comes as part of the extended 1 panel status type of FSP message all the time and fills up the log buffer like the following. ------------Sapphire log--------------- EPOW: Received extended 1 EPOW from FSP EPOW: Received extended 1 EPOW from FSP EPOW: Received extended 1 EPOW from FSP EPOW: Received extended 1 EPOW from FSP EPOW: Received extended 1 EPOW from FSP EPOW: Received extended 1 EPOW from FSP EPOW: Received extended 1 EPOW from FSP EPOW: Received extended 1 EPOW from FSP EPOW: Received extended 1 EPOW from FSP EPOW: Received extended 1 EPOW from FSP EPOW: Received extended 1 EPOW from FSP EPOW: Received extended 1 EPOW from FSP EPOW: Received extended 1 EPOW from FSP EPOW: Received extended 1 EPOW from FSP EPOW: Received extended 1 EPOW from FSP EPOW: Received extended 1 EPOW from FSP --------------------------------------- Even without being acted upon, SPCN configuration change does not take down the system. With this patch only the messages, which need to be acted upon will get logged. Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'hw/fsp/fsp-epow.c')
-rw-r--r--hw/fsp/fsp-epow.c38
1 files changed, 29 insertions, 9 deletions
diff --git a/hw/fsp/fsp-epow.c b/hw/fsp/fsp-epow.c
index 0a98d38..80142e5 100644
--- a/hw/fsp/fsp-epow.c
+++ b/hw/fsp/fsp-epow.c
@@ -52,23 +52,46 @@ static void epow_process_base_event(u8 *epow)
* FIXME: As of now, SPCN_FAULT_LOG event is not being used
* as it does not map to any generic defined OPAL EPOW event.
*/
- if (epow[3] & SPCN_CNF_CHNG)
+ if (epow[3] & SPCN_CNF_CHNG) {
+ /*
+ * The frequency of the SPCN_CNF_CHNG message is very
+ * high on POWER7 and POWER8 systems which will fill
+ * up the Sapphire log buffer. SPCN configuration
+ * change does not take down the system, hence the
+ * logging of these type of messages can be avoided to
+ * save precious log buffer space.
+ */
epow_status[OPAL_SYSEPOW_POWER] |= OPAL_SYSPOWER_CHNG;
- if (epow[3] & SPCN_POWR_FAIL)
+ }
+
+ if (epow[3] & SPCN_POWR_FAIL) {
+ printf(PREFIX "FSP message with SPCN_POWR_FAIL\n");
epow_status[OPAL_SYSEPOW_POWER] |= OPAL_SYSPOWER_FAIL;
- if (epow[3] & SPCN_INCL_POWR)
+ }
+
+ if (epow[3] & SPCN_INCL_POWR) {
+ printf(PREFIX "FSP message with SPCN_INCL_POWR\n");
epow_status[OPAL_SYSEPOW_POWER] |= OPAL_SYSPOWER_INCL;
+ }
}
/* Process FSP sent EPOW based information */
static void epow_process_ex1_event(u8 *epow)
{
- if (epow[4] == EPOW_ON_UPS)
+ if (epow[4] == EPOW_ON_UPS) {
+ printf(PREFIX "FSP message with EPOW_ON_UPS\n");
epow_status[OPAL_SYSEPOW_POWER] |= OPAL_SYSPOWER_UPS;
- if (epow[4] == EPOW_TMP_AMB)
+ }
+
+ if (epow[4] == EPOW_TMP_AMB) {
+ printf(PREFIX "FSP message with EPOW_TMP_AMB\n");
epow_status[OPAL_SYSEPOW_TEMP] |= OPAL_SYSTEMP_AMB;
- if (epow[4] == EPOW_TMP_INT)
+ }
+
+ if (epow[4] == EPOW_TMP_INT) {
+ printf(PREFIX "FSP message with EPOW_TMP_INT\n");
epow_status[OPAL_SYSEPOW_TEMP] |= OPAL_SYSTEMP_INT;
+ }
}
/* Update the system EPOW status */
@@ -205,15 +228,12 @@ static bool fsp_epow_message(u32 cmd_sub_mod, struct fsp_msg *msg)
{
switch(cmd_sub_mod) {
case FSP_CMD_PANELSTATUS:
- printf(PREFIX "Received normal EPOW from FSP\n");
fsp_process_epow(msg, EPOW_NORMAL);
return true;
case FSP_CMD_PANELSTATUS_EX1:
- printf(PREFIX "Received extended 1 EPOW from FSP\n");
fsp_process_epow(msg, EPOW_EX1);
return true;
case FSP_CMD_PANELSTATUS_EX2:
- printf(PREFIX "Received extended 2 EPOW from FSP\n");
fsp_process_epow(msg, EPOW_EX2);
return true;
}