Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

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