From 4802d470208093139e06b126868b76e1dc0864a1 Mon Sep 17 00:00:00 2001 From: Alistair Popple Date: Wed, 7 Sep 2016 17:17:33 +1000 Subject: hw/npu.c: Fix reserved PE# 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 Signed-off-by: Stewart Smith --- hw/npu.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/npu.c b/hw/npu.c index 33269bb6..685acc6c 100644 --- a/hw/npu.c +++ b/hw/npu.c @@ -458,7 +458,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; } @@ -1561,7 +1561,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)); @@ -1670,5 +1670,3 @@ void probe_npu(void) dt_for_each_compatible(dt_root, np, "ibm,power8-npu-pciex") npu_create_phb(np); } - - -- cgit v1.2.1