blob: da533c8b314b0cfd9ad87f5bb318497d93f98054 [file] [log] [blame]
From: Pasha Tatashin <pasha.tatashin@soleen.com>
Subject: kho: move kho debugfs directory to liveupdate
Date: Tue, 7 Oct 2025 03:31:00 +0000
Now, that LUO and KHO both live under kernel/liveupdate, it makes sense to
also move the kho debugfs files to liveupdate/
The old names:
/sys/kernel/debug/kho/out/
/sys/kernel/debug/kho/in/
The new names:
/sys/kernel/debug/liveupdate/kho_out/
/sys/kernel/debug/liveupdate/kho_in/
Also, export the liveupdate_debufs_root, so future LUO selftests could
use it as well.
Link: https://lkml.kernel.org/r/20251007033100.836886-8-pasha.tatashin@soleen.com
Signed-off-by: Pasha Tatashin <pasha.tatashin@soleen.com>
Cc: Alexander Graf <graf@amazon.com>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Jason Gunthorpe <jgg@nvidia.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Miguel Ojeda <ojeda@kernel.org>
Cc: "Mike Rapoport (Microsoft)" <rppt@kernel.org>
Cc: Pratyush Yadav <pratyush@kernel.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
kernel/liveupdate/kexec_handover_debug.c | 10 +++++-----
kernel/liveupdate/kexec_handover_internal.h | 2 ++
tools/testing/selftests/kho/init.c | 2 +-
3 files changed, 8 insertions(+), 6 deletions(-)
--- a/kernel/liveupdate/kexec_handover_debug.c~kho-move-kho-debugfs-directory-to-liveupdate
+++ a/kernel/liveupdate/kexec_handover_debug.c
@@ -15,7 +15,7 @@
#include <linux/mm.h>
#include "kexec_handover_internal.h"
-static struct dentry *debugfs_root;
+struct dentry *liveupdate_debugfs_root;
struct fdt_debugfs {
struct list_head list;
@@ -115,7 +115,7 @@ __init void kho_in_debugfs_init(struct k
INIT_LIST_HEAD(&dbg->fdt_list);
- dir = debugfs_create_dir("in", debugfs_root);
+ dir = debugfs_create_dir("kho_in", liveupdate_debugfs_root);
if (IS_ERR(dir)) {
err = PTR_ERR(dir);
goto err_out;
@@ -175,7 +175,7 @@ __init int kho_out_debugfs_init(struct k
INIT_LIST_HEAD(&dbg->fdt_list);
- dir = debugfs_create_dir("out", debugfs_root);
+ dir = debugfs_create_dir("kho_out", liveupdate_debugfs_root);
if (IS_ERR(dir))
return -ENOMEM;
@@ -209,8 +209,8 @@ err_rmdir:
__init int kho_debugfs_init(void)
{
- debugfs_root = debugfs_create_dir("kho", NULL);
- if (IS_ERR(debugfs_root))
+ liveupdate_debugfs_root = debugfs_create_dir("liveupdate", NULL);
+ if (IS_ERR(liveupdate_debugfs_root))
return -ENOENT;
return 0;
}
--- a/kernel/liveupdate/kexec_handover_internal.h~kho-move-kho-debugfs-directory-to-liveupdate
+++ a/kernel/liveupdate/kexec_handover_internal.h
@@ -15,6 +15,8 @@ struct kho_debugfs {
struct list_head fdt_list;
};
+extern struct dentry *liveupdate_debugfs_root;
+
#else
struct kho_debugfs {};
#endif
--- a/tools/testing/selftests/kho/init.c~kho-move-kho-debugfs-directory-to-liveupdate
+++ a/tools/testing/selftests/kho/init.c
@@ -11,7 +11,7 @@
/* from arch/x86/include/asm/setup.h */
#define COMMAND_LINE_SIZE 2048
-#define KHO_FINALIZE "/debugfs/kho/out/finalize"
+#define KHO_FINALIZE "/debugfs/liveupdate/kho_out/finalize"
#define KERNEL_IMAGE "/kernel"
static int mount_filesystems(void)
_