arch/powerpc/include/asm/kexec.h

Source file repositories/reference/linux-study-clean/arch/powerpc/include/asm/kexec.h

File Facts

System
Linux kernel
Corpus path
arch/powerpc/include/asm/kexec.h
Extension
.h
Size
6565 bytes
Lines
226
Domain
Architecture Layer
Bucket
arch/powerpc
Inferred role
Architecture Layer: implementation source
Status
source implementation candidate

Why This File Exists

CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.

Dependency Surface

Detected Declarations

Annotated Snippet

struct kimage_arch {
	struct crash_mem *exclude_ranges;

	unsigned long backup_start;
	void *backup_buf;
	void *fdt;
};
#endif

#ifdef CONFIG_KEXEC_FILE
extern const struct kexec_file_ops kexec_elf64_ops;

char *setup_kdump_cmdline(struct kimage *image, char *cmdline,
			  unsigned long cmdline_len);
int setup_purgatory(struct kimage *image, const void *slave_code,
		    const void *fdt, unsigned long kernel_load_addr,
		    unsigned long fdt_load_addr);

#ifdef CONFIG_PPC64
struct kexec_buf;

int arch_kexec_kernel_image_probe(struct kimage *image, void *buf, unsigned long buf_len);
#define arch_kexec_kernel_image_probe arch_kexec_kernel_image_probe

int arch_kimage_file_post_load_cleanup(struct kimage *image);
#define arch_kimage_file_post_load_cleanup arch_kimage_file_post_load_cleanup

int arch_check_excluded_range(struct kimage *image, unsigned long start,
			      unsigned long end);
#define arch_check_excluded_range  arch_check_excluded_range


int load_crashdump_segments_ppc64(struct kimage *image,
				  struct kexec_buf *kbuf);
int setup_purgatory_ppc64(struct kimage *image, const void *slave_code,
			  const void *fdt, unsigned long kernel_load_addr,
			  unsigned long fdt_load_addr);
unsigned int kexec_extra_fdt_size_ppc64(struct kimage *image, struct crash_mem *rmem);
int setup_new_fdt_ppc64(const struct kimage *image, void *fdt, struct crash_mem *rmem);
#endif /* CONFIG_PPC64 */

#endif /* CONFIG_KEXEC_FILE */

#endif /* CONFIG_KEXEC_CORE */

#ifdef CONFIG_CRASH_RESERVE
int __init overlaps_crashkernel(unsigned long start, unsigned long size);
extern void arch_reserve_crashkernel(void);
extern void kdump_cma_reserve(void);
#else
static inline void arch_reserve_crashkernel(void) {}
static inline int overlaps_crashkernel(unsigned long start, unsigned long size) { return 0; }
static inline void kdump_cma_reserve(void) { }
#endif

#if defined(CONFIG_CRASH_DUMP)
/*
 * This function is responsible for capturing register states if coming
 * via panic or invoking dump using sysrq-trigger.
 */
static inline void crash_setup_regs(struct pt_regs *newregs,
					struct pt_regs *oldregs)
{
	if (oldregs)
		memcpy(newregs, oldregs, sizeof(*newregs));
	else
		ppc_save_regs(newregs);
}

#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

int arch_crash_hotplug_support(struct kimage *image, unsigned long kexec_flags);
#define arch_crash_hotplug_support arch_crash_hotplug_support

unsigned int arch_crash_get_elfcorehdr_size(void);
#define crash_get_elfcorehdr_size arch_crash_get_elfcorehdr_size

int machine_kexec_post_load(struct kimage *image);
#define machine_kexec_post_load machine_kexec_post_load

#endif /* CONFIG_CRASH_HOTPLUG */

extern int crashing_cpu;
extern void crash_send_ipi(void (*crash_ipi_callback)(struct pt_regs *));
extern void crash_ipi_callback(struct pt_regs *regs);
extern int crash_wake_offline;

extern int crash_shutdown_register(crash_shutdown_t handler);

Annotation

Implementation Notes