[Skiboot] [PATCH 7/9] npu2: Fix missing iteration in tce kill loop

Reza Arbab arbab at linux.ibm.com
Thu Jan 10 02:58:49 AEDT 2019


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 at linux.ibm.com>
---
 hw/npu2.c | 1 +
 1 file changed, 1 insertion(+)

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:
-- 
1.8.3.1



More information about the Skiboot mailing list