[PATCH] powerpc/fadump: set an upper limit for boot memory size
Hari Bathini
hbathini at linux.vnet.ibm.com
Wed Feb 22 05:11:34 AEDT 2017
Hi Michael,
On Friday 17 February 2017 11:54 AM, Michael Ellerman wrote:
> Hari Bathini <hbathini at linux.vnet.ibm.com> writes:
>
>> diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
>> index de7d39a..d5107f4 100644
>> --- a/arch/powerpc/kernel/fadump.c
>> +++ b/arch/powerpc/kernel/fadump.c
>> @@ -222,6 +222,18 @@ static inline unsigned long fadump_calculate_reserve_size(void)
>> &size, &base);
>> if (ret == 0 && size > 0) {
>> fw_dump.reserve_bootvar = (unsigned long)size;
>> + /*
>> + * Adjust if the boot memory size specified is above
>> + * the upper limit.
>> + */
>> + if (fw_dump.reserve_bootvar >
>> + (memblock_end_of_DRAM() / MAX_BOOT_MEM_RATIO)) {
> Using memblock_end_of_DRAM() doesn't take into account the fact that you
> might have holes in your memory layout.
>
> Possibly on PowerVM that never happens, but I don't think we should
> write the code to assume that, if possible.
>
I think memblock_phys_mem_size() can fill in..
In the same file, memblock_end_of_DRAM() is also used when nothing
is specified through cmdline. Let me also change that and respin..
Thanks
Hari
More information about the Linuxppc-dev
mailing list