Skip to content

Commit

Permalink
From patchwork series 395411
Browse files Browse the repository at this point in the history
  • Loading branch information
Fox Snowpatch committed Feb 17, 2024
1 parent 35d5936 commit c335901
Show file tree
Hide file tree
Showing 17 changed files with 589 additions and 217 deletions.
4 changes: 4 additions & 0 deletions arch/powerpc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,10 @@ config RELOCATABLE_TEST
config ARCH_SUPPORTS_CRASH_DUMP
def_bool PPC64 || PPC_BOOK3S_32 || PPC_85xx || (44x && !SMP)

config ARCH_SUPPORTS_CRASH_HOTPLUG
def_bool y
depends on PPC64

config ARCH_SELECTS_CRASH_DUMP
def_bool y
depends on CRASH_DUMP
Expand Down
15 changes: 15 additions & 0 deletions arch/powerpc/include/asm/kexec.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,21 @@ void crash_free_reserved_phys_range(unsigned long begin, unsigned long end);
#endif /* CONFIG_PPC_RTAS */
#endif /* CONFIG_CRASH_DUMP */

#ifdef CONFIG_PPC64
struct crash_mem;
int update_cpus_node(void *fdt);
int get_crash_memory_ranges(struct crash_mem **mem_ranges);

#ifdef CONFIG_CRASH_HOTPLUG
void arch_crash_handle_hotplug_event(struct kimage *image, void *arg);
#define arch_crash_handle_hotplug_event arch_crash_handle_hotplug_event

unsigned int arch_crash_get_elfcorehdr_size(void);
#define crash_get_elfcorehdr_size arch_crash_get_elfcorehdr_size

#endif /* CONFIG_CRASH_HOTPLUG */
#endif /* CONFIG_PPC64 */

#ifdef CONFIG_KEXEC_FILE
extern const struct kexec_file_ops kexec_elf64_ops;

Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/include/asm/kexec_ranges.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
void sort_memory_ranges(struct crash_mem *mrngs, bool merge);
struct crash_mem *realloc_mem_ranges(struct crash_mem **mem_ranges);
int add_mem_range(struct crash_mem **mem_ranges, u64 base, u64 size);
int remove_mem_range(struct crash_mem **mem_ranges, u64 base, u64 size);
int add_tce_mem_ranges(struct crash_mem **mem_ranges);
int add_initrd_mem_range(struct crash_mem **mem_ranges);
#ifdef CONFIG_PPC_64S_HASH_MMU
Expand Down
4 changes: 2 additions & 2 deletions arch/powerpc/kexec/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
# Makefile for the linux kernel.
#

obj-y += core.o crash.o core_$(BITS).o
obj-y += core.o crash.o ranges.o core_$(BITS).o

obj-$(CONFIG_PPC32) += relocate_32.o

obj-$(CONFIG_KEXEC_FILE) += file_load.o ranges.o file_load_$(BITS).o elf_$(BITS).o
obj-$(CONFIG_KEXEC_FILE) += file_load.o file_load_$(BITS).o elf_$(BITS).o

# Disable GCOV, KCOV & sanitizers in odd or sensitive code
GCOV_PROFILE_core_$(BITS).o := n
Expand Down

0 comments on commit c335901

Please sign in to comment.