From: Jason Miu <jasonmiu@google.com>
To: Alexander Graf <graf@amazon.com>,
Andrew Morton <akpm@linux-foundation.org>,
Baoquan He <bhe@redhat.com>,
Changyuan Lyu <changyuanl@google.com>,
David Matlack <dmatlack@google.com>,
David Rientjes <rientjes@google.com>,
Jason Gunthorpe <jgg@nvidia.com>,
Jason Miu <jasonmiu@google.com>, Mike Rapoport <rppt@kernel.org>,
Pasha Tatashin <pasha.tatashin@soleen.com>,
Pratyush Yadav <pratyush@kernel.org>,
kexec@lists.infradead.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org
Subject: [PATCH v2 3/3] kho: Remove notifier system infrastructure
Date: Mon, 20 Oct 2025 03:03:06 -0700 [thread overview]
Message-ID: <20251020100306.2709352-4-jasonmiu@google.com> (raw)
In-Reply-To: <20251020100306.2709352-1-jasonmiu@google.com>
Eliminate the core KHO notifier API
functions (`register_kho_notifier`, `unregister_kho_notifier`), the
`kho_event` enum, and the notifier chain head from KHO internal
structures.
This infrastructure was used to support the now-removed finalize and
abort states and is no longer required. Client subsystems now interact
with KHO through direct API calls.
Signed-off-by: Jason Miu <jasonmiu@google.com>
---
include/linux/kexec_handover.h | 22 ----------------------
kernel/kexec_handover.c | 15 ---------------
2 files changed, 37 deletions(-)
diff --git a/include/linux/kexec_handover.h b/include/linux/kexec_handover.h
index 1f2ca09519a1..d345f301c57b 100644
--- a/include/linux/kexec_handover.h
+++ b/include/linux/kexec_handover.h
@@ -10,16 +10,7 @@ struct kho_scratch {
phys_addr_t size;
};
-/* KHO Notifier index */
-enum kho_event {
- KEXEC_KHO_FINALIZE = 0,
- KEXEC_KHO_ABORT = 1,
-};
-
struct folio;
-struct notifier_block;
-
-struct kho_serialization;
#ifdef CONFIG_KEXEC_HANDOVER
bool kho_is_enabled(void);
@@ -31,9 +22,6 @@ int kho_add_subtree(const char *name, void *fdt);
int kho_remove_subtree(const char *name);
int kho_retrieve_subtree(const char *name, phys_addr_t *phys);
-int register_kho_notifier(struct notifier_block *nb);
-int unregister_kho_notifier(struct notifier_block *nb);
-
void kho_memory_init(void);
void kho_populate(phys_addr_t fdt_phys, u64 fdt_len, phys_addr_t scratch_phys,
@@ -74,16 +62,6 @@ static inline int kho_remove_subtree(const char *name)
return -EOPNOTSUPP;
}
-static inline int register_kho_notifier(struct notifier_block *nb)
-{
- return -EOPNOTSUPP;
-}
-
-static inline int unregister_kho_notifier(struct notifier_block *nb)
-{
- return -EOPNOTSUPP;
-}
-
static inline void kho_memory_init(void)
{
}
diff --git a/kernel/kexec_handover.c b/kernel/kexec_handover.c
index 1138b16fa546..325b83a609fc 100644
--- a/kernel/kexec_handover.c
+++ b/kernel/kexec_handover.c
@@ -17,7 +17,6 @@
#include <linux/list.h>
#include <linux/log2.h>
#include <linux/memblock.h>
-#include <linux/notifier.h>
#include <linux/page-isolation.h>
#include <linux/rwsem.h>
#include <linux/live_update/abi/kexec_handover.h>
@@ -674,13 +673,11 @@ static int kho_debugfs_fdt_remove(struct list_head *list, const char *name)
}
struct kho_out {
- struct blocking_notifier_head chain_head;
struct dentry *dir;
struct kho_serialization ser;
};
static struct kho_out kho_out = {
- .chain_head = BLOCKING_NOTIFIER_INIT(kho_out.chain_head),
.ser = {
.fdt_list = LIST_HEAD_INIT(kho_out.ser.fdt_list),
},
@@ -787,18 +784,6 @@ int kho_remove_subtree(const char *name)
}
EXPORT_SYMBOL_GPL(kho_remove_subtree);
-int register_kho_notifier(struct notifier_block *nb)
-{
- return blocking_notifier_chain_register(&kho_out.chain_head, nb);
-}
-EXPORT_SYMBOL_GPL(register_kho_notifier);
-
-int unregister_kho_notifier(struct notifier_block *nb)
-{
- return blocking_notifier_chain_unregister(&kho_out.chain_head, nb);
-}
-EXPORT_SYMBOL_GPL(unregister_kho_notifier);
-
/**
* kho_preserve_folio - preserve a folio across kexec.
* @folio: folio to preserve.
--
2.51.0.858.gf9c4a03a3a-goog
prev parent reply other threads:[~2025-10-20 10:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-20 10:03 [PATCH v2 0/3] Make KHO Stateless Jason Miu
2025-10-20 10:03 ` [PATCH v2 1/3] kho: Adopt KHO radix tree data structures Jason Miu
2025-10-22 15:51 ` David Matlack
2025-10-23 0:51 ` Jason Miu
2025-10-23 17:43 ` Jason Gunthorpe
2025-10-29 1:28 ` Jason Miu
2025-10-23 23:45 ` Jason Gunthorpe
2025-10-24 1:23 ` Pasha Tatashin
2025-10-24 11:43 ` Jason Gunthorpe
2025-10-27 11:53 ` Mike Rapoport
2025-10-29 2:08 ` Jason Miu
2025-10-20 10:03 ` [PATCH v2 2/3] memblock: kho: Remove KHO notifier usage Jason Miu
2025-10-20 10:03 ` Jason Miu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251020100306.2709352-4-jasonmiu@google.com \
--to=jasonmiu@google.com \
--cc=akpm@linux-foundation.org \
--cc=bhe@redhat.com \
--cc=changyuanl@google.com \
--cc=dmatlack@google.com \
--cc=graf@amazon.com \
--cc=jgg@nvidia.com \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=pasha.tatashin@soleen.com \
--cc=pratyush@kernel.org \
--cc=rientjes@google.com \
--cc=rppt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox