Re: [PATCH] memory: tegra: add multi-socket support to the memory interconnect
From: Sumit Gupta
Date: Wed May 27 2026 - 10:23:44 EST
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);That's a probe path and you created a singletone. Looks like preventing
+ 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)
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);
Thank you,
Sumit Gupta
+ mc_debugfs_root = debugfs_create_dir("mc", NULL);
+
+ if (dev_to_node(mc->dev) == NUMA_NO_NODE)
+ mc->debugfs.root = mc_debugfs_root;
+ else
+ mc->debugfs.root = debugfs_create_dir(dev_name(mc->dev), mc_debugfs_root);
Best regards,
Krzysztof