⬢ DragonFlyBSD Kernel Audit
DF-4901 / twin_diff.cz-vs-tonga.txt
← back to finding ↓ download raw
0a1,8
>  * @adev: amdgpu_device pointer
>  *
>  * Get the IH ring buffer wptr from either the register
>  * or the writeback memory buffer (VI).  Also check for
>  * ring buffer overflow and deal with it.
>  * Used by cz_irq_process(VI).
>  * Returns the value of the wptr.
>  */
5c13,16
< 	wptr = le32_to_cpu(adev->wb.wb[adev->irq.ih.wptr_offs]);
---
> 	if (adev->irq.ih.use_bus_addr)
> 		wptr = le32_to_cpu(adev->irq.ih.ring[adev->irq.ih.wptr_offs]);
> 	else
> 		wptr = le32_to_cpu(adev->wb.wb[adev->irq.ih.wptr_offs]);
11,21d21
< 		 * this should allow us to catchup.
< 		 */
< 		dev_warn(adev->dev, "IH ring buffer overflow (0x%08X, 0x%08X, 0x%08X)\n",
< 			wptr, adev->irq.ih.rptr, (wptr + 16) & adev->irq.ih.ptr_mask);
< 		adev->irq.ih.rptr = (wptr + 16) & adev->irq.ih.ptr_mask;
< 		tmp = RREG32(mmIH_RB_CNTL);
< 		tmp = REG_SET_FIELD(tmp, IH_RB_CNTL, WPTR_OVERFLOW_CLEAR, 1);
< 		WREG32(mmIH_RB_CNTL, tmp);
< 	}
< 	return (wptr & adev->irq.ih.ptr_mask);
< }