summaryrefslogtreecommitdiff
path: root/arch/powerpc/include/asm/fadump-internal.h
diff options
context:
space:
mode:
authorHari Bathini <hbathini@linux.ibm.com>2019-09-11 17:48:40 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2019-09-13 17:04:42 +0300
commitd3833a7010817f82bff373e26d146e6401c695f4 (patch)
treefdc78526a00370ed1e08c8b66a495732566295e9 /arch/powerpc/include/asm/fadump-internal.h
parent0226e55275e569126882a7befe0b1a1c9bd270aa (diff)
downloadlinux-d3833a7010817f82bff373e26d146e6401c695f4.tar.xz
powerpc/fadump: introduce callbacks for platform specific operations
Introduce callback functions for platform specific operations like register, unregister, invalidate & such. Also, define place-holders for the same on pSeries platform. Signed-off-by: Hari Bathini <hbathini@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/156821330286.5656.15538934400074110770.stgit@hbathini.in.ibm.com
Diffstat (limited to 'arch/powerpc/include/asm/fadump-internal.h')
-rw-r--r--arch/powerpc/include/asm/fadump-internal.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/fadump-internal.h b/arch/powerpc/include/asm/fadump-internal.h
index f8097510e03f..8ecd23421b6c 100644
--- a/arch/powerpc/include/asm/fadump-internal.h
+++ b/arch/powerpc/include/asm/fadump-internal.h
@@ -77,6 +77,9 @@ struct fad_crash_memory_ranges {
unsigned long long size;
};
+/* Platform specific callback functions */
+struct fadump_ops;
+
/* Firmware-assisted dump configuration details. */
struct fw_dump {
unsigned long reserve_dump_area_start;
@@ -99,6 +102,20 @@ struct fw_dump {
unsigned long dump_active:1;
unsigned long dump_registered:1;
unsigned long nocma:1;
+
+ struct fadump_ops *ops;
+};
+
+struct fadump_ops {
+ u64 (*fadump_init_mem_struct)(struct fw_dump *fadump_conf);
+ int (*fadump_register)(struct fw_dump *fadump_conf);
+ int (*fadump_unregister)(struct fw_dump *fadump_conf);
+ int (*fadump_invalidate)(struct fw_dump *fadump_conf);
+ int (*fadump_process)(struct fw_dump *fadump_conf);
+ void (*fadump_region_show)(struct fw_dump *fadump_conf,
+ struct seq_file *m);
+ void (*fadump_trigger)(struct fadump_crash_info_header *fdh,
+ const char *msg);
};
/* Helper functions */
@@ -109,4 +126,11 @@ void fadump_update_elfcore_header(char *bufp);
bool is_fadump_boot_mem_contiguous(void);
bool is_fadump_reserved_mem_contiguous(void);
+#ifdef CONFIG_PPC_PSERIES
+extern void rtas_fadump_dt_scan(struct fw_dump *fadump_conf, u64 node);
+#else
+static inline void
+rtas_fadump_dt_scan(struct fw_dump *fadump_conf, u64 node) { }
+#endif
+
#endif /* _ASM_POWERPC_FADUMP_INTERNAL_H */