mirror of
https://github.com/torvalds/linux.git
synced 2026-10-09 12:06:03 +02:00
iommu/qcom: Fix inverted fault report check in qcom_iommu_fault()
report_iommu_fault() returns 0 when a fault handler successfully handles
the fault, and -ENOSYS when no handler is installed. The condition
'!report_iommu_fault()' evaluates to true (printing "Unhandled context
fault") precisely when the fault *was* handled, and stays silent when no
handler is present — the opposite of what is intended.
Remove the '!' so the driver logs unhandled faults correctly.
Fixes: 049541e178 ("iommu: qcom: wire up fault handler")
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>
Signed-off-by: Will Deacon <will@kernel.org>
This commit is contained in:
parent
c579f18e79
commit
1f33b8208a
|
|
@ -200,7 +200,7 @@ static irqreturn_t qcom_iommu_fault(int irq, void *dev)
|
|||
fsynr = iommu_readl(ctx, ARM_SMMU_CB_FSYNR0);
|
||||
iova = iommu_readq(ctx, ARM_SMMU_CB_FAR);
|
||||
|
||||
if (!report_iommu_fault(ctx->domain, ctx->dev, iova, 0)) {
|
||||
if (report_iommu_fault(ctx->domain, ctx->dev, iova, 0)) {
|
||||
dev_err_ratelimited(ctx->dev,
|
||||
"Unhandled context fault: fsr=0x%x, "
|
||||
"iova=0x%016llx, fsynr=0x%x, cb=%d\n",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user