FILE
kexec_handover_internal.h
File preview with syntax highlighting.
linux-6.19.14/kernel/liveupdate/kexec_handover_internal.h
1/* SPDX-License-Identifier: GPL-2.0 */ 2#ifndef LINUX_KEXEC_HANDOVER_INTERNAL_H 3#define LINUX_KEXEC_HANDOVER_INTERNAL_H 4 5#include <linux/kexec_handover.h> 6#include <linux/list.h> 7#include <linux/types.h> 8 9#ifdef CONFIG_KEXEC_HANDOVER_DEBUGFS 10#include <linux/debugfs.h> 11 12struct kho_debugfs { 13 struct dentry *dir; 14 struct dentry *sub_fdt_dir; 15 struct list_head fdt_list; 16}; 17 18#else 19struct kho_debugfs {}; 20#endif 21 22extern struct kho_scratch *kho_scratch; 23extern unsigned int kho_scratch_cnt; 24 25bool kho_finalized(void); 26int kho_finalize(void); 27 28#ifdef CONFIG_KEXEC_HANDOVER_DEBUGFS 29int kho_debugfs_init(void); 30void kho_in_debugfs_init(struct kho_debugfs *dbg, const void *fdt); 31int kho_out_debugfs_init(struct kho_debugfs *dbg); 32int kho_debugfs_fdt_add(struct kho_debugfs *dbg, const char *name, 33 const void *fdt, bool root); 34void kho_debugfs_fdt_remove(struct kho_debugfs *dbg, void *fdt); 35#else 36static inline int kho_debugfs_init(void) { return 0; } 37static inline void kho_in_debugfs_init(struct kho_debugfs *dbg, 38 const void *fdt) { } 39static inline int kho_out_debugfs_init(struct kho_debugfs *dbg) { return 0; } 40static inline int kho_debugfs_fdt_add(struct kho_debugfs *dbg, const char *name, 41 const void *fdt, bool root) { return 0; } 42static inline void kho_debugfs_fdt_remove(struct kho_debugfs *dbg, 43 void *fdt) { } 44#endif /* CONFIG_KEXEC_HANDOVER_DEBUGFS */ 45 46#ifdef CONFIG_KEXEC_HANDOVER_DEBUG 47bool kho_scratch_overlap(phys_addr_t phys, size_t size); 48#else 49static inline bool kho_scratch_overlap(phys_addr_t phys, size_t size) 50{ 51 return false; 52} 53#endif /* CONFIG_KEXEC_HANDOVER_DEBUG */ 54 55#endif /* LINUX_KEXEC_HANDOVER_INTERNAL_H */
~/
Read-only file preview.