[PATCH] pseries: phyp dump: Variable size reserve space.
Manish Ahuja
ahuja at austin.ibm.com
Thu Apr 10 03:37:51 EST 2008
Olof Johansson wrote:
>> +static inline unsigned long phyp_dump_calculate_reserve_size(void)
>> +{
>> + unsigned long tmp;
>> +
>> + if (phyp_dump_info->phyp_dump_reserve_bootvar)
>> + return phyp_dump_info->phyp_dump_reserve_bootvar;
>> +
>> + /* divide by 20 to get 5% of value */
>> + tmp = lmb_end_of_DRAM();
>> + do_div(tmp, 20);
>> +
>> + /* round it down in multiples of 256 */
>> + tmp = tmp & ~0x000000001FFFFFFF;
>
> That's 512MB, isn't it?
My calculations in the example I gave in the last email were wrong.
In mentally did 10% instead of 5%. But the premise is same.
So assuming 5% of some memory is 400 MB, it rounds it down to 256MB etc.
More information about the Linuxppc-dev
mailing list