@@ -307,7 +307,7 @@ static void iommu_pmu_event_update(struct perf_event *event)
307307
308308again :
309309 prev_count = local64_read (& hwc -> prev_count );
310- new_count = dmar_readq (iommu_event_base (iommu_pmu , hwc -> idx ));
310+ new_count = readq (iommu_event_base (iommu_pmu , hwc -> idx ));
311311 if (local64_xchg (& hwc -> prev_count , new_count ) != prev_count )
312312 goto again ;
313313
@@ -340,7 +340,7 @@ static void iommu_pmu_start(struct perf_event *event, int flags)
340340 hwc -> state = 0 ;
341341
342342 /* Always reprogram the period */
343- count = dmar_readq (iommu_event_base (iommu_pmu , hwc -> idx ));
343+ count = readq (iommu_event_base (iommu_pmu , hwc -> idx ));
344344 local64_set ((& hwc -> prev_count ), count );
345345
346346 /*
@@ -496,7 +496,7 @@ static void iommu_pmu_counter_overflow(struct iommu_pmu *iommu_pmu)
496496 * Two counters may be overflowed very close. Always check
497497 * whether there are more to handle.
498498 */
499- while ((status = dmar_readq (iommu_pmu -> overflow ))) {
499+ while ((status = readq (iommu_pmu -> overflow ))) {
500500 for_each_set_bit (i , (unsigned long * )& status , iommu_pmu -> num_cntr ) {
501501 /*
502502 * Find the assigned event of the counter.
@@ -518,7 +518,7 @@ static irqreturn_t iommu_pmu_irq_handler(int irq, void *dev_id)
518518{
519519 struct intel_iommu * iommu = dev_id ;
520520
521- if (!dmar_readl (iommu -> reg + DMAR_PERFINTRSTS_REG ))
521+ if (!readl (iommu -> reg + DMAR_PERFINTRSTS_REG ))
522522 return IRQ_NONE ;
523523
524524 iommu_pmu_counter_overflow (iommu -> pmu );
@@ -555,7 +555,7 @@ static int __iommu_pmu_register(struct intel_iommu *iommu)
555555static inline void __iomem *
556556get_perf_reg_address (struct intel_iommu * iommu , u32 offset )
557557{
558- u32 off = dmar_readl (iommu -> reg + offset );
558+ u32 off = readl (iommu -> reg + offset );
559559
560560 return iommu -> reg + off ;
561561}
@@ -574,7 +574,7 @@ int alloc_iommu_pmu(struct intel_iommu *iommu)
574574 if (!cap_ecmds (iommu -> cap ))
575575 return - ENODEV ;
576576
577- perfcap = dmar_readq (iommu -> reg + DMAR_PERFCAP_REG );
577+ perfcap = readq (iommu -> reg + DMAR_PERFCAP_REG );
578578 /* The performance monitoring is not supported. */
579579 if (!perfcap )
580580 return - ENODEV ;
@@ -617,8 +617,8 @@ int alloc_iommu_pmu(struct intel_iommu *iommu)
617617 for (i = 0 ; i < iommu_pmu -> num_eg ; i ++ ) {
618618 u64 pcap ;
619619
620- pcap = dmar_readq (iommu -> reg + DMAR_PERFEVNTCAP_REG +
621- i * IOMMU_PMU_CAP_REGS_STEP );
620+ pcap = readq (iommu -> reg + DMAR_PERFEVNTCAP_REG +
621+ i * IOMMU_PMU_CAP_REGS_STEP );
622622 iommu_pmu -> evcap [i ] = pecap_es (pcap );
623623 }
624624
@@ -651,9 +651,9 @@ int alloc_iommu_pmu(struct intel_iommu *iommu)
651651 * Width.
652652 */
653653 for (i = 0 ; i < iommu_pmu -> num_cntr ; i ++ ) {
654- cap = dmar_readl (iommu_pmu -> cfg_reg +
655- i * IOMMU_PMU_CFG_OFFSET +
656- IOMMU_PMU_CFG_CNTRCAP_OFFSET );
654+ cap = readl (iommu_pmu -> cfg_reg +
655+ i * IOMMU_PMU_CFG_OFFSET +
656+ IOMMU_PMU_CFG_CNTRCAP_OFFSET );
657657 if (!iommu_cntrcap_pcc (cap ))
658658 continue ;
659659
@@ -675,9 +675,9 @@ int alloc_iommu_pmu(struct intel_iommu *iommu)
675675
676676 /* Override with per-counter event capabilities */
677677 for (j = 0 ; j < iommu_cntrcap_egcnt (cap ); j ++ ) {
678- cap = dmar_readl (iommu_pmu -> cfg_reg + i * IOMMU_PMU_CFG_OFFSET +
679- IOMMU_PMU_CFG_CNTREVCAP_OFFSET +
680- (j * IOMMU_PMU_OFF_REGS_STEP ));
678+ cap = readl (iommu_pmu -> cfg_reg + i * IOMMU_PMU_CFG_OFFSET +
679+ IOMMU_PMU_CFG_CNTREVCAP_OFFSET +
680+ (j * IOMMU_PMU_OFF_REGS_STEP ));
681681 iommu_pmu -> cntr_evcap [i ][iommu_event_group (cap )] = iommu_event_select (cap );
682682 /*
683683 * Some events may only be supported by a specific counter.
0 commit comments