[PATCH] firmware: tegra: bpmp: Allow BPMP debugfs population to be skipped
From: Aniruddha Rao
Date: Thu Oct 01 2026 - 01:08:11 EST
Populating the BPMP firmware debugfs requires a sequence of synchronous
firmware transactions during BPMP probe, which impacts the overall boot
time. Currently, the only way to avoid populating the BPMP debugfs is to
disable CONFIG_DEBUG_FS completely.
Add a tegra_bpmp.debugfs module parameter so systems can skip populating
the BPMP debugfs with tegra_bpmp.debugfs=0. Keep it enabled by default to
preserve existing behavior. The parameter is defined in bpmp-debugfs.c,
so it is available only when CONFIG_DEBUG_FS is enabled.
Signed-off-by: Aniruddha Rao <anrao@xxxxxxxxxx>
---
drivers/firmware/tegra/bpmp-debugfs.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/firmware/tegra/bpmp-debugfs.c b/drivers/firmware/tegra/bpmp-debugfs.c
index 33c6300af964..2efc48b522ac 100644
--- a/drivers/firmware/tegra/bpmp-debugfs.c
+++ b/drivers/firmware/tegra/bpmp-debugfs.c
@@ -6,6 +6,7 @@
#include <linux/cleanup.h>
#include <linux/debugfs.h>
#include <linux/dma-mapping.h>
+#include <linux/moduleparam.h>
#include <linux/slab.h>
#include <linux/uaccess.h>
@@ -773,6 +774,11 @@ static int bpmp_populate_debugfs_shmem(struct tegra_bpmp *bpmp)
static DEFINE_MUTEX(bpmp_debugfs_root_lock);
static struct dentry *bpmp_debugfs_root;
+static bool bpmp_debugfs_enabled = true;
+
+module_param_named(debugfs, bpmp_debugfs_enabled, bool, 0444);
+MODULE_PARM_DESC(debugfs,
+ "Populate the BPMP firmware debugfs (default: enabled)");
static struct dentry *bpmp_debugfs_get_root(void)
{
@@ -789,6 +795,9 @@ int tegra_bpmp_init_debugfs(struct tegra_bpmp *bpmp)
bool inband;
int err;
+ if (!bpmp_debugfs_enabled)
+ return 0;
+
inband = tegra_bpmp_mrq_is_supported(bpmp, MRQ_DEBUG);
if (!inband && !tegra_bpmp_mrq_is_supported(bpmp, MRQ_DEBUGFS))
--
2.43.0