diff options
| author | Shradha Gupta <shradhagupta@linux.microsoft.com> | 2026-10-09 03:22:32 -0700 |
|---|---|---|
| committer | Wei Liu <wei.liu@kernel.org> | 2026-10-21 00:19:40 -0700 |
| commit | 14c73a2b061e494ab6da346ab075b14f2a4b2d06 (patch) | |
| tree | 524eedba7a72d153e41ce3b3aa7a9efe83678bd2 /scripts/basic/split-include.c | |
| parent | 016ac8174d932db3615534ba15ce5f70b3a15913 (diff) | |
| download | linux-14c73a2b061e494ab6da346ab075b14f2a4b2d06.tar.gz linux-14c73a2b061e494ab6da346ab075b14f2a4b2d06.zip | |
kexec: Add helper to report an active kexec reboot
A shutdown callback in a loadable module may need to distinguish a
kexec reboot from a normal restart, halt, or poweroff. The Hyper-V
VMBus driver needs this distinction when moving its kexec cleanup into
a common syscore shutdown callback.
Add kexec_is_in_progress() and export it to GPL modules so the callback
can remain guarded when VMBus is built as a module. Provide a false
inline implementation when CONFIG_KEXEC_CORE is disabled.
The helper reports only the normal kexec reboot path. Crash kexec and
preserve-context kexec do not set this state.
Signed-off-by: Shradha Gupta <shradhagupta@linux.microsoft.com>
Acked-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Reviewed-by: Michael Kelley <mhklinux@outlook.com>
Reviewed-by: Bradley Morgan <brads@mainlining.org>
Reviewed-by: Naman Jain <namjain@linux.microsoft.com>
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Diffstat (limited to 'scripts/basic/split-include.c')
0 files changed, 0 insertions, 0 deletions
