Re: [PATCH 3/5] iommu/arm-smmu-v3: Add Stream Table Entry display to debugfs

From: Nicolin Chen

Date: Tue May 26 2026 - 22:43:49 EST


On Tue, May 26, 2026 at 07:18:54PM -0700, Nicolin Chen wrote:
> On Wed, May 20, 2026 at 02:37:09PM +0800, Qinxin Xia wrote:
> > +int arm_smmu_debugfs_create_stream_table(struct arm_smmu_device *smmu,
> > + struct device *dev)
> > +{
> > + struct dentry *stream_dir, *dev_dir;
> > + struct arm_smmu_master *master;
> > + struct ste_context *ctx;
> > + char name[64];
> > + u32 sid;
> > + int i;
> [...]
> > + master = dev_iommu_priv_get(dev);
> > + if (!master || !master->num_streams)
> > + return -ENODEV;
>
> The caller has master. Why not just pass it in? Then, you would
> have master->smmu and master->dev.

I forgot that this is to fence against concurrent device unplug.

Maybe add a note for the reason of having smmu and dev instead?

Nicolin