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

Andrew Donnellan andrew.donnellan at au1.ibm.com
Thu Jan 10 11:05:01 AEDT 2019


On 10/1/19 2:58 am, Reza Arbab wrote:
> 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>

Reviewed-by: Andrew Donnellan <andrew.donnellan at au1.ibm.com>

This looks like it might be fixing an actual bug? Should it go to stable?

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

-- 
Andrew Donnellan              OzLabs, ADL Canberra
andrew.donnellan at au1.ibm.com  IBM Australia Limited



More information about the Skiboot mailing list