[Skiboot] [PATCH 12/61] external/opal-prd: Fix occ, homer node label search

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Mon Jul 19 23:19:23 AEST 2021


Starting P10, hostboot/HDAT will provide consistent reserved node name. It will
just provide node name without starting string "ibm,". That will cause
`pm-complex <*>` operation to fails.

This patch fixes above issue. For backward compatability purpose I have
kept support for old variant of node name as well.

Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
---
 external/opal-prd/opal-prd.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/external/opal-prd/opal-prd.c b/external/opal-prd/opal-prd.c
index 12269e8eb..1c610da4c 100644
--- a/external/opal-prd/opal-prd.c
+++ b/external/opal-prd/opal-prd.c
@@ -1508,17 +1508,23 @@ static int pm_complex_load_start(void)
 
 	range = find_range("ibm,occ-common-area", 0);
 	if (!range) {
-		pr_log(LOG_ERR, "PM: ibm,occ-common-area not found");
-		return rc;
+		range = find_range("occ-common-area", 0);
+		if (!range) {
+			pr_log(LOG_ERR, "PM: occ-common-area not found");
+			return rc;
+		}
 	}
 	occ_common = range->physaddr;
 
 	for (i = 0; i < nr_chips; i++) {
 		range = find_range("ibm,homer-image", chips[i]);
 		if (!range) {
-			pr_log(LOG_ERR, "PM: ibm,homer-image not found 0x%lx",
-			       chips[i]);
-			return -1;
+			range = find_range("homer-image", chips[i]);
+			if (!range) {
+				pr_log(LOG_ERR, "PM: homer-image not found 0x%lx",
+				       chips[i]);
+				return -1;
+			}
 		}
 		homer = range->physaddr;
 
-- 
2.31.1



More information about the Skiboot mailing list