On Wed, May 27, 2026 at 04:46:38PM +0200, Krzysztof Kozlowski wrote: > On 27/05/2026 16:21, Sumit Gupta wrote: > > > > On 27/05/26 18:25, Krzysztof Kozlowski wrote: > >> External email: Use caution opening links or attachments > >> > >> > >> On 21/05/2026 16:05, Sumit Gupta wrote: > >>> - err = icc_link_create(node, TEGRA_ICC_MC); > >>> + err = tegra_mc_icc_link_create(node, node_id, TEGRA_ICC_MC); > >>> if (err) > >>> goto remove_nodes; > >>> > >>> @@ -957,7 +969,13 @@ static int tegra_mc_probe(struct platform_device *pdev) > >>> if (IS_ERR(mc->regs)) > >>> return PTR_ERR(mc->regs); > >>> > >>> - mc->debugfs.root = debugfs_create_dir("mc", NULL); > >>> + if (!mc_debugfs_root) > >> That's a probe path and you created a singletone. Looks like preventing > >> async probing for no real reason. > >> > >> I am very against singletons and debugfs does not look like justified > >> exception. > > > > The singleton was added so multi-socket MC/EMC instances could > > share a "mc"/"emc" parent. I'll drop it in v2. > > > > On single-socket SoCs, the "mc"/"emc" names will be unchanged. > > On multi-socket SoCs, each instance will create a top-level debugfs > > dir named with dev_name(). Same pattern in tegra186-emc.c. > > > >   if (dev_to_node(mc->dev) == NUMA_NO_NODE) > >       mc->debugfs.root = debugfs_create_dir("mc", NULL); > >   else > >       mc->debugfs.root = debugfs_create_dir(dev_name(mc->dev), NULL); > > You assume this is fully synced, so you as well could do a look up and > then use what you found or create new dir. If you think that is racy, so > is this approach... How are other drivers handling per-device debugfs > directories? Do they also create such in the top-level? I think no. I think we want a top-level directory for a bit more structure in debugfs. But I also think we want to create that top-level directory in the module's init function rather than _probe. Granted, that means we can't use any of those helper macros, but we don't use that for the MC driver anyway. Thierry