Skip to content

Commit fdc39b7

Browse files
hegdevasantjoergroedel
authored andcommitted
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 <[email protected]> Reviewed-by: Suravee Suthikulpanit <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent 014e756 commit fdc39b7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/iommu/amd/iommu.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -825,10 +825,12 @@ static void iommu_poll_events(struct amd_iommu *iommu)
825825

826826
while (head != tail) {
827827
iommu_print_event(iommu, iommu->evt_buf + head);
828+
829+
/* Update head pointer of hardware ring-buffer */
828830
head = (head + EVENT_ENTRY_SIZE) % EVT_BUFFER_SIZE;
831+
writel(head, iommu->mmio_base + MMIO_EVT_HEAD_OFFSET);
829832
}
830833

831-
writel(head, iommu->mmio_base + MMIO_EVT_HEAD_OFFSET);
832834
}
833835

834836
#ifdef CONFIG_IRQ_REMAP

0 commit comments

Comments
 (0)