[bug report] iommu/arm-smmu-v3: Event cannot be printed in some scenarios

Kunkun Jiang jiangkunkun at huawei.com
Tue Jul 23 18:42:09 PDT 2024


Hi all,

drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
1797                 while (!queue_remove_raw(q, evt)) {
1798                         u8 id = FIELD_GET(EVTQ_0_ID, evt[0]);
1799
1800                         ret = arm_smmu_handle_evt(smmu, evt);
1801                         if (!ret || !__ratelimit(&rs))
1802                                 continue;
1803
1804                         dev_info(smmu->dev, "event 0x%02x 
received:\n", id);
1805                         for (i = 0; i < ARRAY_SIZE(evt); ++i)
1806                                 dev_info(smmu->dev, "\t0x%016llx\n",
1807                                          (unsigned long long)evt[i]);
1808
1809                         cond_resched();
1810                 }

The smmu-v3 driver cannot print event information when "ret" is 0.
Unfortunately due to commit 3dfa64aecbaf
("iommu: Make iommu_report_device_fault() return void"), the default
return value in arm_smmu_handle_evt() is 0. Maybe a trace should
be added here?

Thanks,
Kunkun Jiang




More information about the linux-arm-kernel mailing list