[PATCH 2/8] pseries: phyp dump: reserve-release proof-of-concept
Paul Mackerras
paulus at samba.org
Thu Feb 7 11:42:05 EST 2008
Manish Ahuja writes:
> Initial patch for reserving memory in early boot, and freeing it later.
> If the previous boot had ended with a crash, the reserved memory would contain
> a copy of the crashed kernel data.
[snip]
> +static void __init reserve_crashed_mem(void)
> +{
> + unsigned long base, size;
> +
> + if (phyp_dump_info->phyp_dump_is_active) {
> + /* Reserve *everything* above RMR. We'll free this real soon.*/
> + base = PHYP_DUMP_RMR_END;
> + size = lmb_end_of_DRAM() - base;
> +
> + /* XXX crashed_ram_end is wrong, since it may be beyond
> + * the memory_limit, it will need to be adjusted. */
> + lmb_reserve(base, size);
> +
> + phyp_dump_info->init_reserve_start = base;
> + phyp_dump_info->init_reserve_size = size;
> + }
> + else {
> + size = phyp_dump_info->cpu_state_size +
> + phyp_dump_info->hpte_region_size +
> + PHYP_DUMP_RMR_END;
> + base = lmb_end_of_DRAM() - size;
> + printk(KERN_ERR "Manish reserve regular kernel space is %ld %ld\n", base, size);
> + lmb_reserve(base, size);
This is still reserving memory even on systems that aren't running on
pHyp at all. Please rework this so that no memory is reserved if the
system doesn't support phyp-assisted dump.
Paul.
More information about the Linuxppc-dev
mailing list