[Skiboot] [PATCH] hw/npu.c: Fix reserved PE#

Alistair Popple alistair at popple.id.au
Wed Sep 7 17:17:33 AEST 2016


Currently the reserved PE is set to NPU_NUM_OF_PES, which is one
greater than the maximum PE resulting in the following kernel errors
at boot:

[    0.000000] pnv_ioda_reserve_pe: Invalid PE 4 on PHB#4
[    0.000000] pnv_ioda_reserve_pe: Invalid PE 4 on PHB#5

Due to a HW errata PE#0 is already reserved in the kernel, so update
the opal-reserved-pe device-tree property to match this.

Signed-off-by: Alistair Popple <alistair at popple.id.au>
---
 hw/npu.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/hw/npu.c b/hw/npu.c
index a9a167e..906b30c 100644
--- a/hw/npu.c
+++ b/hw/npu.c
@@ -644,7 +644,7 @@ static void npu_ioda_init(struct npu *p)
 	/* PCT - Reset to reserved PE# */
 	for (i = 0; i < ARRAY_SIZE(p->pce_cache); i++) {
 		data64 = &p->pce_cache[i];
-		*data64 = SETFIELD(NPU_IODA_PCT_PE, 0ul, NPU_NUM_OF_PES);
+		*data64 = SETFIELD(NPU_IODA_PCT_PE, 0ul, 0ul);
 		*data64 |= NPU_IODA_PCT_LINK_ENABLED;
 	}
 
@@ -1747,7 +1747,7 @@ static void npu_add_phb_properties(struct npu *p)
 	dt_add_property_cells(np, "ibm,opal-num-pes",
 			      NPU_NUM_OF_PES);
 	dt_add_property_cells(np, "ibm,opal-reserved-pe",
-			      NPU_NUM_OF_PES);
+			      0);
         dt_add_property_cells(np, "ibm,opal-tce-kill",
 			      hi32(tkill), lo32(tkill));
 
@@ -1856,5 +1856,3 @@ void probe_npu(void)
 	dt_for_each_compatible(dt_root, np, "ibm,power8-npu-pciex")
 		npu_create_phb(np);
 }
-
-
-- 
2.1.4



More information about the Skiboot mailing list