lkml.org 
[lkml]   [2021]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC v1 3/8] crash hp: definitions and prototypes for crash hotplug support
Date
This change adds two members to struct kimage to faciliate crash
hotplug support.

This change also defines crash hotplug events and associated
prototypes for use by the crash hotplug handlers.

Signed-off-by: Eric DeVolder <eric.devolder@oracle.com>
---
include/linux/kexec.h | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/include/linux/kexec.h b/include/linux/kexec.h
index 0c994ae37729..8bbf2ae7a040 100644
--- a/include/linux/kexec.h
+++ b/include/linux/kexec.h
@@ -221,8 +221,9 @@ struct crash_mem {
extern int crash_exclude_mem_range(struct crash_mem *mem,
unsigned long long mstart,
unsigned long long mend);
-extern int crash_prepare_elf64_headers(struct crash_mem *mem, int kernel_map,
- void **addr, unsigned long *sz);
+extern int crash_prepare_elf64_headers(struct kimage *image,
+ struct crash_mem *mem, int kernel_map,
+ void **addr, unsigned long *sz);
#endif /* CONFIG_KEXEC_FILE */

#ifdef CONFIG_KEXEC_ELF
@@ -299,6 +300,11 @@ struct kimage {

/* Information for loading purgatory */
struct purgatory_info purgatory_info;
+
+#ifdef CONFIG_CRASH_HOTPLUG
+ int hotplug_event;
+ int offlinecpu;
+#endif
#endif

#ifdef CONFIG_IMA_KEXEC
@@ -315,6 +321,18 @@ struct kimage {
unsigned long elf_load_addr;
};

+#ifdef CONFIG_CRASH_HOTPLUG
+void arch_update_crash_elfcorehdr(struct kimage *image,
+ unsigned int hp_action, unsigned long a, unsigned long b);
+#define KEXEC_CRASH_HP_REMOVE_CPU 0
+#define KEXEC_CRASH_HP_ADD_CPU 1
+#define KEXEC_CRASH_HP_REMOVE_MEMORY 2
+#define KEXEC_CRASH_HP_ADD_MEMORY 3
+#endif /* CONFIG_CRASH_HOTPLUG */
+int kexec_calculate_store_digests(struct kimage *image);
+int kimage_load_segment(struct kimage *image, struct kexec_segment *segment);
+void kimage_file_post_load_cleanup(struct kimage *image);
+
/* kexec interface functions */
extern void machine_kexec(struct kimage *image);
extern int machine_kexec_prepare(struct kimage *image);
--
2.27.0
\
 
 \ /
  Last update: 2021-11-18 18:51    [W:0.189 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site