[Skiboot] [PATCH] hw/phb4: Make pci-tracing print at PR_NOTICE

Oliver O'Halloran oohall at gmail.com
Mon May 6 14:00:29 AEST 2019


When pci-tracing is enabled we print each trace status message and the
final trace status at PR_ERROR. The final status messages are similar to
those printed when we fail to train in the non-pci-tracing path and this
has resulted in spurious op-test failures.

This patch reduces the log-level of the tracing message to PR_NOTICE so
they're not accidently interpreted as actual error messages. PR_NOTICE
messages are still printed to the console during boot.

Signed-off-by: Oliver O'Halloran <oohall at gmail.com>
---
 hw/phb4.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/hw/phb4.c b/hw/phb4.c
index 3b0ebfba886b..740924a6fa9e 100644
--- a/hw/phb4.c
+++ b/hw/phb4.c
@@ -137,6 +137,9 @@ static void phb4_init_hw(struct phb4 *p);
 #define PHBINF(p, fmt, a...)	prlog(PR_INFO, "PHB#%04x[%d:%d]: " fmt, \
 				      (p)->phb.opal_id, (p)->chip_id, \
 				      (p)->index,  ## a)
+#define PHBNOTICE(p, fmt, a...)	prlog(PR_NOTICE, "PHB#%04x[%d:%d]: " fmt, \
+				      (p)->phb.opal_id, (p)->chip_id, \
+				      (p)->index,  ## a)
 #define PHBERR(p, fmt, a...)	prlog(PR_ERR, "PHB#%04x[%d:%d]: " fmt, \
 				      (p)->phb.opal_id, (p)->chip_id, \
 				      (p)->index,  ## a)
@@ -2385,7 +2388,7 @@ static void phb4_train_info(struct phb4 *p, uint64_t reg, unsigned long time)
 	default:
 		snprintf(s, sizeof(s), "%sunvalid", s);
 	}
-	PHBERR(p, "%s\n", s);
+	PHBNOTICE(p, "%s\n", s);
 }
 
 static void phb4_dump_pec_err_regs(struct phb4 *p)
@@ -2663,15 +2666,15 @@ static void phb4_training_trace(struct phb4 *p)
 		reglast = reg;
 
 		if (!phb4_check_reg(p, reg)) {
-			PHBERR(p, "TRACE: PHB fence waiting link.\n");
+			PHBNOTICE(p, "TRACE: PHB fence waiting link.\n");
 			break;
 		}
 		if (reg & PHB_PCIE_DLP_TL_LINKACT) {
-			PHBERR(p, "TRACE: Link trained.\n");
+			PHBNOTICE(p, "TRACE: Link trained.\n");
 			break;
 		}
 		if ((now - start) > secs_to_tb(3)) {
-			PHBERR(p, "TRACE: Timeout waiting for link up.\n");
+			PHBNOTICE(p, "TRACE: Timeout waiting for link up.\n");
 			break;
 		}
 	}
-- 
2.20.1



More information about the Skiboot mailing list