HDAT/device-tree: only add lid-type on pre-POWER9 systems

Message ID 20170808224245.21322-1-stewart@linux.vnet.ibm.com
State Accepted
Headers show

Commit Message

Stewart Smith Aug. 8, 2017, 10:42 p.m.
Largely a relic of back when we had multiple entry points into OPAL depending
on which mechanism on an FSP we were using to get loaded, this isn't needed
on modern P9 as we only have one entry point (we don't do the PHYP LID hack).

Fixes: https://github.com/open-power/skiboot/issues/82
Reported-by: Pavaman Subramaniyam <pavsubra@linux.vnet.ibm.com>
Reported-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
---
 hdata/spira.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Vasant Hegde Aug. 9, 2017, 3:22 p.m. | #1
On 08/09/2017 04:12 AM, Stewart Smith wrote:
> Largely a relic of back when we had multiple entry points into OPAL depending
> on which mechanism on an FSP we were using to get loaded, this isn't needed
> on modern P9 as we only have one entry point (we don't do the PHYP LID hack).

I don't think we used PHYP LID hack in P8 as well. I think  was only for lab 
experiments only.
I think we can get rid of it completely.


-Vasant
Stewart Smith Aug. 22, 2017, 5:01 a.m. | #2
Stewart Smith <stewart@linux.vnet.ibm.com> writes:
> Largely a relic of back when we had multiple entry points into OPAL depending
> on which mechanism on an FSP we were using to get loaded, this isn't needed
> on modern P9 as we only have one entry point (we don't do the PHYP LID hack).
>
> Fixes: https://github.com/open-power/skiboot/issues/82
> Reported-by: Pavaman Subramaniyam <pavsubra@linux.vnet.ibm.com>
> Reported-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com>
> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>

Merged as of ffc262f7a11de769b4b8fb21288a301dee0de756

Patch

diff --git a/hdata/spira.c b/hdata/spira.c
index 58afb9396261..f6dd03dcd92f 100644
--- a/hdata/spira.c
+++ b/hdata/spira.c
@@ -1,4 +1,4 @@ 
-/* Copyright 2013-2014 IBM Corp.
+/* Copyright 2013-2017 IBM Corp.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -1268,7 +1268,9 @@  int parse_hdat(bool is_opal)
 	 */
 	dt_add_property_cells(dt_root, "#address-cells", 2);
 	dt_add_property_cells(dt_root, "#size-cells", 2);
-	dt_add_property_string(dt_root, "lid-type", is_opal ? "opal" : "phyp");
+
+	if (proc_gen < proc_gen_p9)
+		dt_add_property_string(dt_root, "lid-type", is_opal ? "opal" : "phyp");
 
 	/* Add any BMCs and enable the LPC UART */
 	bmc_parse();