aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorAlexey Kardashevskiy <aik@ozlabs.ru>2018-12-06 19:29:10 +1100
committerVasant Hegde <hegdevasant@linux.vnet.ibm.com>2018-12-14 11:13:05 +0530
commit12595094567a5142281c2a9c062c0ef503ff93cc (patch)
tree388f8b5d966318c8fbf2f2d3887c5d0d29851048 /hw
parentf4afd85a84ab090ddda7aea18c5153755777f103 (diff)
downloadskiboot-12595094567a5142281c2a9c062c0ef503ff93cc.zip
skiboot-12595094567a5142281c2a9c062c0ef503ff93cc.tar.gz
skiboot-12595094567a5142281c2a9c062c0ef503ff93cc.tar.bz2
npu2: Advertise correct TCE page size
[Upstream Commit 003ccd5775161d352c53cac3d00c6283eb036ffc] The P9 NPU workbook says that only 4K/64K/16M/256M page size are supported and in fact npu2_map_pe_dma_window() supports just these but in absence of the "ibm,supported-tce-sizes" property Linux assumes the default P9 PHB4 page sizes - 4K/64K/2M/1G - so when Linux tries 2M/1G TCEs, we get lots of "Unexpected TCE size" from npu2_tce_kill(). This advertises TCE page sizes so Linux could handle it correctly, i.e. fall back to 4K/64K TCEs. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Stewart Smith <stewart@linux.ibm.com> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/npu2.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/npu2.c b/hw/npu2.c
index d6c612a..a72cdf9 100644
--- a/hw/npu2.c
+++ b/hw/npu2.c
@@ -1813,6 +1813,11 @@ static void npu2_add_phb_properties(struct npu2 *p)
NPU2_MAX_PE_NUM);
dt_add_property_cells(np, "ibm,opal-reserved-pe",
NPU2_RESERVED_PE_NUM);
+ dt_add_property_cells(np, "ibm,supported-tce-sizes",
+ 12, // 4K
+ 16, // 64K
+ 24, // 16M
+ 28); // 256M
mmio_atsd = (u64) p->regs +
NPU2_REG_OFFSET(NPU2_STACK_ATSD, NPU2_BLOCK_ATSD0, NPU2_XTS_MMIO_ATSD_LAUNCH);