mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-11-23 07:51:32 +00:00
accel/habanalabs: remove completion from abnormal interrupt work name
Decoder abnormal interrupts are for errors and not for completion, so rename the relevant work and work function to not include 'completion'. Signed-off-by: Tomer Tayar <ttayar@habana.ai> Reviewed-by: Oded Gabbay <ogabbay@kernel.org> Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
This commit is contained in:
parent
49fd071d15
commit
9cf56f0d97
@ -43,22 +43,24 @@ static void dec_print_abnrm_intr_source(struct hl_device *hdev, u32 irq_status)
|
||||
intr_source[2], intr_source[3], intr_source[4], intr_source[5]);
|
||||
}
|
||||
|
||||
static void dec_error_intr_work(struct hl_device *hdev, u32 base_addr, u32 core_id)
|
||||
static void dec_abnrm_intr_work(struct work_struct *work)
|
||||
{
|
||||
struct hl_dec *dec = container_of(work, struct hl_dec, abnrm_intr_work);
|
||||
struct hl_device *hdev = dec->hdev;
|
||||
bool reset_required = false;
|
||||
u32 irq_status, event_mask;
|
||||
|
||||
irq_status = RREG32(base_addr + VCMD_IRQ_STATUS_OFFSET);
|
||||
irq_status = RREG32(dec->base_addr + VCMD_IRQ_STATUS_OFFSET);
|
||||
|
||||
dev_err(hdev->dev, "Decoder abnormal interrupt %#x, core %d\n", irq_status, core_id);
|
||||
dev_err(hdev->dev, "Decoder abnormal interrupt %#x, core %d\n", irq_status, dec->core_id);
|
||||
|
||||
dec_print_abnrm_intr_source(hdev, irq_status);
|
||||
|
||||
/* Clear the interrupt */
|
||||
WREG32(base_addr + VCMD_IRQ_STATUS_OFFSET, irq_status);
|
||||
WREG32(dec->base_addr + VCMD_IRQ_STATUS_OFFSET, irq_status);
|
||||
|
||||
/* Flush the interrupt clear */
|
||||
RREG32(base_addr + VCMD_IRQ_STATUS_OFFSET);
|
||||
RREG32(dec->base_addr + VCMD_IRQ_STATUS_OFFSET);
|
||||
|
||||
if (irq_status & VCMD_IRQ_STATUS_TIMEOUT_MASK) {
|
||||
reset_required = true;
|
||||
@ -77,14 +79,6 @@ static void dec_error_intr_work(struct hl_device *hdev, u32 base_addr, u32 core_
|
||||
}
|
||||
}
|
||||
|
||||
static void dec_completion_abnrm(struct work_struct *work)
|
||||
{
|
||||
struct hl_dec *dec = container_of(work, struct hl_dec, completion_abnrm_work);
|
||||
struct hl_device *hdev = dec->hdev;
|
||||
|
||||
dec_error_intr_work(hdev, dec->base_addr, dec->core_id);
|
||||
}
|
||||
|
||||
void hl_dec_fini(struct hl_device *hdev)
|
||||
{
|
||||
kfree(hdev->dec);
|
||||
@ -108,7 +102,7 @@ int hl_dec_init(struct hl_device *hdev)
|
||||
dec = hdev->dec + j;
|
||||
|
||||
dec->hdev = hdev;
|
||||
INIT_WORK(&dec->completion_abnrm_work, dec_completion_abnrm);
|
||||
INIT_WORK(&dec->abnrm_intr_work, dec_abnrm_intr_work);
|
||||
dec->core_id = j;
|
||||
dec->base_addr = hdev->asic_funcs->get_dec_base_addr(hdev, j);
|
||||
if (!dec->base_addr) {
|
||||
|
||||
@ -1211,15 +1211,15 @@ struct hl_eq {
|
||||
/**
|
||||
* struct hl_dec - describes a decoder sw instance.
|
||||
* @hdev: pointer to the device structure.
|
||||
* @completion_abnrm_work: workqueue object to run when decoder generates an error interrupt
|
||||
* @abnrm_intr_work: workqueue work item to run when decoder generates an error interrupt.
|
||||
* @core_id: ID of the decoder.
|
||||
* @base_addr: base address of the decoder.
|
||||
*/
|
||||
struct hl_dec {
|
||||
struct hl_device *hdev;
|
||||
struct work_struct completion_abnrm_work;
|
||||
u32 core_id;
|
||||
u32 base_addr;
|
||||
struct hl_device *hdev;
|
||||
struct work_struct abnrm_intr_work;
|
||||
u32 core_id;
|
||||
u32 base_addr;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@ -489,7 +489,7 @@ irqreturn_t hl_irq_handler_dec_abnrm(int irq, void *arg)
|
||||
{
|
||||
struct hl_dec *dec = arg;
|
||||
|
||||
schedule_work(&dec->completion_abnrm_work);
|
||||
schedule_work(&dec->abnrm_intr_work);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user