mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00

Memory for passing additional parameters to fadump capture kernel
is allocated during subsys_initcall level, using memblock. But
as slab is already available by this time, allocation happens via
the buddy allocator. This may work for radix MMU but is likely to
fail in most cases for hash MMU as hash MMU needs this memory in
the first memory block for it to be accessible in real mode in the
capture kernel (second boot). So, allocate memory for additional
parameters area as soon as MMU mode is obvious.
Fixes: 683eab94da
("powerpc/fadump: setup additional parameters for dump capture kernel")
Reported-by: Venkat Rao Bagalkote <venkat88@linux.vnet.ibm.com>
Closes: https://lore.kernel.org/lkml/a70e4064-a040-447b-8556-1fd02f19383d@linux.vnet.ibm.com/T/#u
Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com>
Tested-by: Venkat Rao Bagalkote <venkat88@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://patch.msgid.link/20241107055817.489795-1-sourabhjain@linux.ibm.com
46 lines
1.4 KiB
C
46 lines
1.4 KiB
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
/*
|
|
* Firmware Assisted dump header file.
|
|
*
|
|
* Copyright 2011 IBM Corporation
|
|
* Author: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
|
|
*/
|
|
|
|
#ifndef _ASM_POWERPC_FADUMP_H
|
|
#define _ASM_POWERPC_FADUMP_H
|
|
|
|
#ifdef CONFIG_FA_DUMP
|
|
|
|
extern int crashing_cpu;
|
|
|
|
extern int is_fadump_memory_area(u64 addr, ulong size);
|
|
extern int setup_fadump(void);
|
|
extern int is_fadump_active(void);
|
|
extern int should_fadump_crash(void);
|
|
extern void crash_fadump(struct pt_regs *, const char *);
|
|
extern void fadump_cleanup(void);
|
|
void fadump_setup_param_area(void);
|
|
extern void fadump_append_bootargs(void);
|
|
|
|
#else /* CONFIG_FA_DUMP */
|
|
static inline int is_fadump_active(void) { return 0; }
|
|
static inline int should_fadump_crash(void) { return 0; }
|
|
static inline void crash_fadump(struct pt_regs *regs, const char *str) { }
|
|
static inline void fadump_cleanup(void) { }
|
|
static inline void fadump_setup_param_area(void) { }
|
|
static inline void fadump_append_bootargs(void) { }
|
|
#endif /* !CONFIG_FA_DUMP */
|
|
|
|
#if defined(CONFIG_FA_DUMP) || defined(CONFIG_PRESERVE_FA_DUMP)
|
|
extern int early_init_dt_scan_fw_dump(unsigned long node, const char *uname,
|
|
int depth, void *data);
|
|
extern int fadump_reserve_mem(void);
|
|
#endif
|
|
|
|
#if defined(CONFIG_FA_DUMP) && defined(CONFIG_CMA)
|
|
void fadump_cma_init(void);
|
|
#else
|
|
static inline void fadump_cma_init(void) { }
|
|
#endif
|
|
|
|
#endif /* _ASM_POWERPC_FADUMP_H */
|