File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -1042,8 +1042,17 @@ static irqreturn_t prq_event_thread(int irq, void *d)
1042
1042
* Clear the page request overflow bit and wake up all threads that
1043
1043
* are waiting for the completion of this handling.
1044
1044
*/
1045
- if (readl (iommu -> reg + DMAR_PRS_REG ) & DMA_PRS_PRO )
1046
- writel (DMA_PRS_PRO , iommu -> reg + DMAR_PRS_REG );
1045
+ if (readl (iommu -> reg + DMAR_PRS_REG ) & DMA_PRS_PRO ) {
1046
+ pr_info_ratelimited ("IOMMU: %s: PRQ overflow detected\n" ,
1047
+ iommu -> name );
1048
+ head = dmar_readq (iommu -> reg + DMAR_PQH_REG ) & PRQ_RING_MASK ;
1049
+ tail = dmar_readq (iommu -> reg + DMAR_PQT_REG ) & PRQ_RING_MASK ;
1050
+ if (head == tail ) {
1051
+ writel (DMA_PRS_PRO , iommu -> reg + DMAR_PRS_REG );
1052
+ pr_info_ratelimited ("IOMMU: %s: PRQ overflow cleared" ,
1053
+ iommu -> name );
1054
+ }
1055
+ }
1047
1056
1048
1057
if (!completion_done (& iommu -> prq_complete ))
1049
1058
complete (& iommu -> prq_complete );
You can’t perform that action at this time.
0 commit comments