Re: [PATCH rc v2 1/5] iommu/arm-smmu-v3: Add arm_smmu_adopt_strtab() for kdump

Nicolin Chen
2026-04-25T00:56:37Z

On Fri, Apr 24, 2026 at 05:50:31PM -0300, Jason Gunthorpe wrote:
> On Fri, Apr 24, 2026 at 11:33:16AM -0700, Nicolin Chen wrote:
> > On Fri, Apr 24, 2026 at 01:56:13PM -0300, Jason Gunthorpe wrote:
> > > On Wed, Apr 15, 2026 at 02:17:36PM -0700, Nicolin Chen wrote:
> > > > +static int arm_smmu_adopt_strtab_2lvl(struct arm_smmu_device *smmu, u32 cfg_reg,
> > [..]
> > > > + cfg->l2.l1tab = devm_memremap(
> > > > + smmu->dev, dma, num_l1_ents * sizeof(struct arm_smmu_strtab_l1),
> > > > + MEMREMAP_WB);
> > >
> > > WB shouldn't be unconditional? If the SMMU is working non-coherently
> > > we need to map it NC. Same remark everwhere
> >
> > Hmm, I am trying to add a coherent-only gate for the series.
>
> OK, may just add a comment to that effect here

Yea, I will add an assertion to the adopt functions as well.

> > MEMREMAP_WC might work. But we cannot verify that on a coherent
> > SMMU, right?
>
> At most you could fake the smmu to noncoherent and check it maps the
> right thing and assume the arch code does it right

I see. I tend to leave it until somebody can verify. It should be
easy to make a followup change:
unsigned long flags = coherent ? MEMREMAP_WB : MEMREMAP_WC;

Thanks
Nicolin