[Skiboot] [PATCH 2/2] POWER9 Cleanups: Don't force clear SPW bits

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Tue Aug 3 00:33:54 AEST 2021


From: "Pratik R. Sampat" <psampat at linux.ibm.com>

SLW force-cleared Special wakeup bits that could hold power management.
However, SLW should expect these bits to be cleared at this point, hence
only read and the report on the SPW bits to find anomalies instead.

Signed-off-by: Pratik R. Sampat <psampat at linux.ibm.com>
Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
---
 hw/slw.c | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/hw/slw.c b/hw/slw.c
index 625ee886e..a0145deb6 100644
--- a/hw/slw.c
+++ b/hw/slw.c
@@ -226,19 +226,15 @@ static bool slw_set_overrides_p9(struct proc_chip *chip, struct cpu_thread *c)
 	int rc;
 	uint32_t core = pir_to_core_id(c->pir);
 
-	/* Clear special wakeup bits that could hold power mgt */
-	rc = xscom_write(chip->id,
-			 XSCOM_ADDR_P9_EC_SLAVE(core, EC_PPM_SPECIAL_WKUP_HYP),
-			 0);
+	/* Special wakeup bits that could hold power mgt */
+	rc = xscom_read(chip->id,
+			XSCOM_ADDR_P9_EC_SLAVE(core, EC_PPM_SPECIAL_WKUP_HYP),
+			&tmp);
 	if (rc) {
 		log_simple_error(&e_info(OPAL_RC_SLW_SET),
-			"SLW: Failed to write EC_PPM_SPECIAL_WKUP_HYP\n");
+				 "SLW: Failed to read EC_PPM_SPECIAL_WKUP_HYP\n");
 		return false;
 	}
-	/* Read back for debug */
-	rc = xscom_read(chip->id,
-			XSCOM_ADDR_P9_EC_SLAVE(core, EC_PPM_SPECIAL_WKUP_HYP),
-			&tmp);
 	if (tmp)
 		prlog(PR_WARNING,
 			"SLW: core %d EC_PPM_SPECIAL_WKUP_HYP read  0x%016llx\n",
-- 
2.31.1



More information about the Skiboot mailing list