Message ID | 156166326909.13320.3330203549978146193.stgit@hbathini.in.ibm.com (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
Series | [1/2] powerpc: reserve memory for capture kernel after hugepages init | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | Successfully applied on branch next (c7d64b560ce80d8c44f082eee8352f0778a73195) |
snowpatch_ozlabs/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 28 lines checked |
Le 27/06/2019 à 21:21, Hari Bathini a écrit : > Sometimes, memory reservation for KDump/FADump can overlap with memory > marked for hugepages. This overlap leads to error, hang in KDump case > and copy error reported by f/w in case of FADump, while trying to > capture dump. Report error while setting up memory for the capture > kernel instead of running into issues while capturing dump, by moving > KDump/FADump reservation below MMU early init and failing gracefully > when hugepages memory overlaps with capture kernel memory. This patch doesn't apply, if it's still needed can you please rebase ? Christophe > > Signed-off-by: Hari Bathini <hbathini@linux.ibm.com> > --- > arch/powerpc/kernel/prom.c | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) > > diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c > index 7159e79..454e19cf 100644 > --- a/arch/powerpc/kernel/prom.c > +++ b/arch/powerpc/kernel/prom.c > @@ -731,14 +731,6 @@ void __init early_init_devtree(void *params) > if (PHYSICAL_START > MEMORY_START) > memblock_reserve(MEMORY_START, 0x8000); > reserve_kdump_trampoline(); > -#ifdef CONFIG_FA_DUMP > - /* > - * If we fail to reserve memory for firmware-assisted dump then > - * fallback to kexec based kdump. > - */ > - if (fadump_reserve_mem() == 0) > -#endif > - reserve_crashkernel(); > early_reserve_mem(); > > /* Ensure that total memory size is page-aligned. */ > @@ -777,6 +769,14 @@ void __init early_init_devtree(void *params) > #endif > > mmu_early_init_devtree(); > +#ifdef CONFIG_FA_DUMP > + /* > + * If we fail to reserve memory for firmware-assisted dump then > + * fallback to kexec based kdump. > + */ > + if (fadump_reserve_mem() == 0) > +#endif > + reserve_crashkernel(); > > #ifdef CONFIG_PPC_POWERNV > /* Scan and build the list of machine check recoverable ranges */
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 7159e79..454e19cf 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c @@ -731,14 +731,6 @@ void __init early_init_devtree(void *params) if (PHYSICAL_START > MEMORY_START) memblock_reserve(MEMORY_START, 0x8000); reserve_kdump_trampoline(); -#ifdef CONFIG_FA_DUMP - /* - * If we fail to reserve memory for firmware-assisted dump then - * fallback to kexec based kdump. - */ - if (fadump_reserve_mem() == 0) -#endif - reserve_crashkernel(); early_reserve_mem(); /* Ensure that total memory size is page-aligned. */ @@ -777,6 +769,14 @@ void __init early_init_devtree(void *params) #endif mmu_early_init_devtree(); +#ifdef CONFIG_FA_DUMP + /* + * If we fail to reserve memory for firmware-assisted dump then + * fallback to kexec based kdump. + */ + if (fadump_reserve_mem() == 0) +#endif + reserve_crashkernel(); #ifdef CONFIG_PPC_POWERNV /* Scan and build the list of machine check recoverable ranges */
Sometimes, memory reservation for KDump/FADump can overlap with memory marked for hugepages. This overlap leads to error, hang in KDump case and copy error reported by f/w in case of FADump, while trying to capture dump. Report error while setting up memory for the capture kernel instead of running into issues while capturing dump, by moving KDump/FADump reservation below MMU early init and failing gracefully when hugepages memory overlaps with capture kernel memory. Signed-off-by: Hari Bathini <hbathini@linux.ibm.com> --- arch/powerpc/kernel/prom.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)