[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 2/2] iommu/amd: Workaround for ERBT1312
>>> On 18.04.13 at 20:41, <suravee.suthikulpanit@xxxxxxx> wrote: What is ERBT1312? Please reference at least the title of the document containing this in the description, so that in few months/years time one can still reconstruct what this refers to. > --- a/xen/drivers/passthrough/amd/iommu_init.c > +++ b/xen/drivers/passthrough/amd/iommu_init.c > @@ -615,16 +615,23 @@ static void iommu_check_event_log(struct amd_iommu > *iommu) > sizeof(event_entry_t), parse_event_log_entry); > > spin_lock_irqsave(&iommu->lock, flags); > - > - /*check event overflow */ > + > entry = readl(iommu->mmio_base + IOMMU_STATUS_MMIO_OFFSET); > > - if ( iommu_get_bit(entry, IOMMU_STATUS_EVENT_OVERFLOW_SHIFT) ) > - iommu_reset_log(iommu, &iommu->event_log, > set_iommu_event_log_control); > + while (entry & IOMMU_STATUS_EVENT_LOG_INT_MASK) { > + > + /*check event overflow */ > + if ( iommu_get_bit(entry, IOMMU_STATUS_EVENT_OVERFLOW_SHIFT) ) > + iommu_reset_log(iommu, &iommu->event_log, > + set_iommu_event_log_control); > > - /* reset interrupt status bit */ > - writel(IOMMU_STATUS_EVENT_LOG_INT_MASK, > - iommu->mmio_base + IOMMU_STATUS_MMIO_OFFSET); > + /* reset interrupt status bit */ > + writel(IOMMU_STATUS_EVENT_LOG_INT_MASK, > + iommu->mmio_base + IOMMU_STATUS_MMIO_OFFSET); > + > + /* This is a hardware bug workaround (ERBT1312) */ > + entry = readl(iommu->mmio_base + IOMMU_STATUS_MMIO_OFFSET); > + } > > spin_unlock_irqrestore(&iommu->lock, flags); > } > @@ -681,18 +688,24 @@ static void iommu_check_ppr_log(struct amd_iommu *iommu) > > iommu_read_log(iommu, &iommu->ppr_log, > sizeof(ppr_entry_t), parse_ppr_log_entry); > - > + > spin_lock_irqsave(&iommu->lock, flags); > > - /*check event overflow */ > entry = readl(iommu->mmio_base + IOMMU_STATUS_MMIO_OFFSET); > > - if ( iommu_get_bit(entry, IOMMU_STATUS_PPR_LOG_OVERFLOW_SHIFT) ) > - iommu_reset_log(iommu, &iommu->ppr_log, set_iommu_ppr_log_control); > + while (entry & IOMMU_STATUS_PPR_LOG_INT_MASK) { > + > + /*check event overflow */ > + if ( iommu_get_bit(entry, IOMMU_STATUS_PPR_LOG_OVERFLOW_SHIFT) ) > + iommu_reset_log(iommu, &iommu->ppr_log, > set_iommu_ppr_log_control); > > - /* reset interrupt status bit */ > - writel(IOMMU_STATUS_PPR_LOG_INT_MASK, > - iommu->mmio_base + IOMMU_STATUS_MMIO_OFFSET); > + /* reset interrupt status bit */ > + writel(IOMMU_STATUS_PPR_LOG_INT_MASK, > + iommu->mmio_base + IOMMU_STATUS_MMIO_OFFSET); > + > + /* This is a hardware bug workaround (ERBT1312) */ > + entry = readl(iommu->mmio_base + IOMMU_STATUS_MMIO_OFFSET); > + } > > spin_unlock_irqrestore(&iommu->lock, flags); > } This needs cleaning up from a coding style perspective: No hard tabs, braces on separate lines, spaces inside the outermost parentheses following keywords, a space following the opening /* of comments, proper indentation of multi-line function arguments. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |