iommu/amd: Update event log pointer as soon as processing is complete
Update event buffer head pointer once driver completes processing. So that IOMMU can write new log without waiting for driver to complete processing all event logs. Signed-off-by: Vasant Hegde <vasant.hegde@amd.com> Reviewed-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Link: https://lore.kernel.org/r/20240828111029.5429-2-vasant.hegde@amd.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
This commit is contained in:
committed by
Joerg Roedel
parent
014e756247
commit
fdc39b77db
@@ -825,10 +825,12 @@ static void iommu_poll_events(struct amd_iommu *iommu)
|
||||
|
||||
while (head != tail) {
|
||||
iommu_print_event(iommu, iommu->evt_buf + head);
|
||||
|
||||
/* Update head pointer of hardware ring-buffer */
|
||||
head = (head + EVENT_ENTRY_SIZE) % EVT_BUFFER_SIZE;
|
||||
writel(head, iommu->mmio_base + MMIO_EVT_HEAD_OFFSET);
|
||||
}
|
||||
|
||||
writel(head, iommu->mmio_base + MMIO_EVT_HEAD_OFFSET);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_IRQ_REMAP
|
||||
|
||||
Reference in New Issue
Block a user