Skip to content

Commit cc9e49d

Browse files
nuttyliujoergroedel
authored andcommitted
iommu/vt-d: Remove debugfs use of private data field
Since the page fault report and response have been tracked by ftrace, the users can easily calculate the time used for a page fault handling. There's no need to expose the similar functionality in debugfs. Hence, remove the corresponding operations in debugfs. Signed-off-by: Jingqi Liu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lu Baolu <[email protected]> Signed-off-by: Joerg Roedel <[email protected]>
1 parent d74169c commit cc9e49d

File tree

3 files changed

+0
-17
lines changed

3 files changed

+0
-17
lines changed

drivers/iommu/intel/debugfs.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,6 @@ static ssize_t dmar_perf_latency_write(struct file *filp,
706706
dmar_latency_disable(iommu, DMAR_LATENCY_INV_IOTLB);
707707
dmar_latency_disable(iommu, DMAR_LATENCY_INV_DEVTLB);
708708
dmar_latency_disable(iommu, DMAR_LATENCY_INV_IEC);
709-
dmar_latency_disable(iommu, DMAR_LATENCY_PRQ);
710709
}
711710
rcu_read_unlock();
712711
break;
@@ -728,12 +727,6 @@ static ssize_t dmar_perf_latency_write(struct file *filp,
728727
dmar_latency_enable(iommu, DMAR_LATENCY_INV_IEC);
729728
rcu_read_unlock();
730729
break;
731-
case 4:
732-
rcu_read_lock();
733-
for_each_active_iommu(iommu, drhd)
734-
dmar_latency_enable(iommu, DMAR_LATENCY_PRQ);
735-
rcu_read_unlock();
736-
break;
737730
default:
738731
return -EINVAL;
739732
}

drivers/iommu/intel/perf.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ enum latency_type {
1111
DMAR_LATENCY_INV_IOTLB = 0,
1212
DMAR_LATENCY_INV_DEVTLB,
1313
DMAR_LATENCY_INV_IEC,
14-
DMAR_LATENCY_PRQ,
1514
DMAR_LATENCY_NUM
1615
};
1716

drivers/iommu/intel/svm.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -583,12 +583,6 @@ static void intel_svm_prq_report(struct intel_iommu *iommu, struct device *dev,
583583
event.fault.prm.flags |= IOMMU_FAULT_PAGE_REQUEST_PRIV_DATA;
584584
event.fault.prm.private_data[0] = desc->priv_data[0];
585585
event.fault.prm.private_data[1] = desc->priv_data[1];
586-
} else if (dmar_latency_enabled(iommu, DMAR_LATENCY_PRQ)) {
587-
/*
588-
* If the private data fields are not used by hardware, use it
589-
* to monitor the prq handle latency.
590-
*/
591-
event.fault.prm.private_data[0] = ktime_to_ns(ktime_get());
592586
}
593587

594588
iommu_report_device_fault(dev, &event);
@@ -768,9 +762,6 @@ void intel_svm_page_response(struct device *dev, struct iopf_fault *evt,
768762
if (private_present) {
769763
desc.qw2 = prm->private_data[0];
770764
desc.qw3 = prm->private_data[1];
771-
} else if (prm->private_data[0]) {
772-
dmar_latency_update(iommu, DMAR_LATENCY_PRQ,
773-
ktime_to_ns(ktime_get()) - prm->private_data[0]);
774765
}
775766

776767
qi_submit_sync(iommu, &desc, 1, 0);

0 commit comments

Comments
 (0)