mirror of
https://github.com/torvalds/linux.git
synced 2024-11-06 03:51:48 +00:00
5f50867b4f
During kdump boot, noticed some machines checkstop on dma protection fault for ongoing DMA left in the first kernel. Instead of initializing TCE entries in iommu_init() for the kdump boot, this patch fixes this issue by walking through the each TCE table and checks whether the entries are in use by the first kernel. If so, reserve those entries by setting the corresponding bit in tbl->it_map such that these entries will not be available for the kdump boot. However it could be possible that all TCE entries might be used up due to the driver bug that does continuous mapping. My observation is around 1700 TCE entries are used on some systems (Ex: P4) at some point of time during kdump boot and saving dump (either write into the disk or sending to remote machine). Hence, this patch will make sure that minimum of 2048 entries will be available such that kdump boot could be successful in some cases. Signed-off-by: Haren Myneni <haren@us.ibm.com> Acked-by: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
41 lines
995 B
C
41 lines
995 B
C
#ifndef _PPC64_KDUMP_H
|
|
#define _PPC64_KDUMP_H
|
|
|
|
/* Kdump kernel runs at 32 MB, change at your peril. */
|
|
#define KDUMP_KERNELBASE 0x2000000
|
|
|
|
/* How many bytes to reserve at zero for kdump. The reserve limit should
|
|
* be greater or equal to the trampoline's end address.
|
|
* Reserve to the end of the FWNMI area, see head_64.S */
|
|
#define KDUMP_RESERVE_LIMIT 0x8000
|
|
|
|
#ifdef CONFIG_CRASH_DUMP
|
|
|
|
#define PHYSICAL_START KDUMP_KERNELBASE
|
|
#define KDUMP_TRAMPOLINE_START 0x0100
|
|
#define KDUMP_TRAMPOLINE_END 0x3000
|
|
|
|
#define KDUMP_MIN_TCE_ENTRIES 2048
|
|
|
|
#else /* !CONFIG_CRASH_DUMP */
|
|
|
|
#define PHYSICAL_START 0x0
|
|
|
|
#endif /* CONFIG_CRASH_DUMP */
|
|
|
|
#ifndef __ASSEMBLY__
|
|
#ifdef CONFIG_CRASH_DUMP
|
|
|
|
extern void reserve_kdump_trampoline(void);
|
|
extern void setup_kdump_trampoline(void);
|
|
|
|
#else /* !CONFIG_CRASH_DUMP */
|
|
|
|
static inline void reserve_kdump_trampoline(void) { ; }
|
|
static inline void setup_kdump_trampoline(void) { ; }
|
|
|
|
#endif /* CONFIG_CRASH_DUMP */
|
|
#endif /* __ASSEMBLY__ */
|
|
|
|
#endif /* __PPC64_KDUMP_H */
|