Re: [PATCH 1/2] habanalabs: Add debugfs node for engines status

From: Oded Gabbay
Date: Mon Jul 01 2019 - 05:01:02 EST


On Mon, Jul 1, 2019 at 11:36 AM Tomer Tayar <ttayar@xxxxxxxxx> wrote:
>
> Command submissions sent to the device are composed of command buffers
> which are targeted to different device engines, like DMA and compute
> entities. When a command submission gets stuck, knowing in which engine
> the stuck is, is crucial for debugging.
> This patch adds a debugfs node that exports this information, by
> displaying the engines' various registers that assemble their idle/busy
> status.
If this is a new node, then you are missing the update to
Documentation/debugfs-driver-habanalabs

>
> The information retrieval is based on the is_device_idle ASIC function.
> The printout in this function, of the first detected busy engine, is
> removed because it becomes redundant in the presence of the more
> elaborated info of the new debugfs node.
>
> The patch also updates the device idle check:
> - Add reading the DMA core status register, because it is possible that
> QMAN has finished its work but the DMA itself is still running.
> - Remove the MME shadow status check, as the MME ARCH status register
> includes the status of all MME shadows.
This seems better to separate into a different patch.
So I suggest first a patch that fixes the device idle check and then
this patch (that adds the debugfs node and uses the idle check
function).

Thanks,
Oded