Re: [PATCH v3] memory: tegra: add multi-socket support to the memory interconnect
From: Jon Hunter
Date: Tue Jul 07 2026 - 07:03:50 EST
On 26/06/2026 14:14, Sumit Gupta wrote:
Add support for representing each memory-controller instance (one
per NUMA node / socket) as its own interconnect (ICC) provider,
with its own MC client nodes, to match the hardware topology on
multi-socket Tegra SoCs.
Use the NUMA node ID to make client IDs globally unique across
per-socket providers, since the ICC framework allocates node IDs
from a single global IDR. Per-socket MC and EMC node names are
also derived from dev_name() so they match the corresponding
debugfs subdirectory. On single-socket platforms (NUMA_NO_NODE)
the existing client IDs and node-name strings are preserved.
Each socket's MC and EMC therefore get their own debugfs
subdirectory under /sys/kernel/debug/{mc,emc}/. The parent
directories are created on first probe.
Bandwidth requests from MC clients in a socket are routed to
that socket's local BPMP.
Signed-off-by: Sumit Gupta <sumitg@xxxxxxxxxx>
---
v2[2] -> v3:
- Reduce per-socket shift to 12 bits to keep composed ICC node
IDs below ICC_DYN_ID_START.
v1[1] -> v2:
- Mutex protected lazy creation of the mc/emc debugfs parent.
- Rename {mc|emc}_debugfs_root to tegra_{mc|emc}_debugfs_root.
[1] https://lore.kernel.org/lkml/20260521140546.3023819-1-sumitg@xxxxxxxxxx/
[2] https://lore.kernel.org/lkml/20260602132314.486066-1-sumitg@xxxxxxxxxx/
---
drivers/memory/tegra/mc.c | 40 ++++++++++++++++-----
drivers/memory/tegra/mc.h | 37 +++++++++++++++++++
drivers/memory/tegra/tegra186-emc.c | 55 ++++++++++++++++++++++++-----
3 files changed, 115 insertions(+), 17 deletions(-)
diff --git a/drivers/memory/tegra/mc.c b/drivers/memory/tegra/mc.c
index ec80ea9cc173..51ad0d3e48d4 100644
--- a/drivers/memory/tegra/mc.c
+++ b/drivers/memory/tegra/mc.c
@@ -3,6 +3,7 @@
* Copyright (C) 2014-2026 NVIDIA CORPORATION. All rights reserved.
*/
+#include <linux/cleanup.h>
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/dma-mapping.h>
@@ -10,6 +11,7 @@
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/module.h>
+#include <linux/mutex.h>
There is a conflict here with the latest -next and so we need to rebase this. Otherwise ...
Tested-by: Jon Hunter <jonathanh@xxxxxxxxxx>
Reviewed-by: Jon Hunter <jonathanh@xxxxxxxxxx>
Thanks
Jon
--
nvpublic