aboutsummaryrefslogtreecommitdiff
path: root/hw/npu2.c
diff options
context:
space:
mode:
authorReza Arbab <arbab@linux.ibm.com>2019-01-09 09:58:49 -0600
committerStewart Smith <stewart@linux.ibm.com>2019-01-16 00:46:49 -0600
commitcd5ddbe3b40c576fc97bb2000b0996e37963286f (patch)
treeb5097fb8273d49360815250f9593554e69c6297d /hw/npu2.c
parentb496cab97086d8adb56aee8099bb785f43fbf187 (diff)
downloadskiboot-cd5ddbe3b40c576fc97bb2000b0996e37963286f.zip
skiboot-cd5ddbe3b40c576fc97bb2000b0996e37963286f.tar.gz
skiboot-cd5ddbe3b40c576fc97bb2000b0996e37963286f.tar.bz2
npu2: Fix missing iteration in tce kill loop
When killing multiple pages, npu2_tce_kill() loops doing single page kills, but never advances the address. Fix this. Signed-off-by: Reza Arbab <arbab@linux.ibm.com> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'hw/npu2.c')
-rw-r--r--hw/npu2.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/npu2.c b/hw/npu2.c
index b826abd..8418e04 100644
--- a/hw/npu2.c
+++ b/hw/npu2.c
@@ -1357,6 +1357,7 @@ static int64_t npu2_tce_kill(struct phb *phb, uint32_t kill_type,
while (npages--) {
val = SETFIELD(NPU2_ATS_TCE_KILL_PENUM, dma_addr, pe_number);
npu2_write(npu, NPU2_ATS_TCE_KILL, NPU2_ATS_TCE_KILL_ONE | val);
+ dma_addr += tce_size;
}
break;
case OPAL_PCI_TCE_KILL_PE: