[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240827120205.GA4647@willie-the-truck>
Date: Tue, 27 Aug 2024 13:02:05 +0100
From: Will Deacon <will@...nel.org>
To: Rob Clark <robdclark@...il.com>
Cc: iommu@...ts.linux.dev, Robin Murphy <robin.murphy@....com>,
Rob Clark <robdclark@...omium.org>, Joerg Roedel <joro@...tes.org>,
"moderated list:ARM SMMU DRIVERS" <linux-arm-kernel@...ts.infradead.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v8 2/4] iommu/io-pgtable-arm: Re-use the pgtable walk for
iova_to_phys
On Mon, Aug 26, 2024 at 10:15:39AM -0700, Rob Clark wrote:
> @@ -776,7 +775,7 @@ static int io_pgtable_visit(struct arm_lpae_io_pgtable *data,
> return 0;
> }
>
> - if (WARN_ON(!iopte_table(pte, lvl)))
> + if (WARN_ON(!iopte_table(pte, lvl) && !selftest_running))
> return -EINVAL;
>
> ptep = iopte_deref(pte, data);
I still don't grok this hunk. If the selftest is running, we want to
return -EINVAL here rather than dereference something that isn't a
table, right?
Suppressing the warning is one thing, but this seems to do more than
that.
Will
Powered by blists - more mailing lists