Merge tag 'nfs-rdma-for-5.3-1' of git://git.linux-nfs.org/projects/anna/linux-nfs
[linux-2.6-block.git] / arch / powerpc / include / asm / kdump.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
0cc4746c
ME
2#ifndef _PPC64_KDUMP_H
3#define _PPC64_KDUMP_H
4
f8f50b1b
DF
5#include <asm/page.h>
6
47310413
ME
7#define KDUMP_KERNELBASE 0x2000000
8
0cc4746c 9/* How many bytes to reserve at zero for kdump. The reserve limit should
47310413
ME
10 * be greater or equal to the trampoline's end address.
11 * Reserve to the end of the FWNMI area, see head_64.S */
e269d269 12#define KDUMP_RESERVE_LIMIT 0x10000 /* 64K */
0cc4746c 13
47310413
ME
14#ifdef CONFIG_CRASH_DUMP
15
f8f50b1b
DF
16/*
17 * On PPC64 translation is disabled during trampoline setup, so we use
18 * physical addresses. Though on PPC32 translation is already enabled,
19 * so we can't do the same. Luckily create_trampoline() creates relative
20 * branches, so we can just add the PAGE_OFFSET and don't worry about it.
21 */
22#ifdef __powerpc64__
0cc4746c
ME
23#define KDUMP_TRAMPOLINE_START 0x0100
24#define KDUMP_TRAMPOLINE_END 0x3000
f8f50b1b
DF
25#else
26#define KDUMP_TRAMPOLINE_START (0x0100 + PAGE_OFFSET)
27#define KDUMP_TRAMPOLINE_END (0x3000 + PAGE_OFFSET)
28#endif /* __powerpc64__ */
0cc4746c 29
5f50867b
HM
30#define KDUMP_MIN_TCE_ENTRIES 2048
31
47310413
ME
32#endif /* CONFIG_CRASH_DUMP */
33
34#ifndef __ASSEMBLY__
47310413 35
0f890c8d 36#if defined(CONFIG_CRASH_DUMP) && !defined(CONFIG_NONSTATIC_KERNEL)
47310413
ME
37extern void reserve_kdump_trampoline(void);
38extern void setup_kdump_trampoline(void);
54622f10 39#else
0f890c8d 40/* !CRASH_DUMP || !NONSTATIC_KERNEL */
47310413
ME
41static inline void reserve_kdump_trampoline(void) { ; }
42static inline void setup_kdump_trampoline(void) { ; }
54622f10 43#endif
47310413 44
47310413 45#endif /* __ASSEMBLY__ */
0cc4746c
ME
46
47#endif /* __PPC64_KDUMP_H */