Re: [PATCH v2 4/8] crash_core: add generic function to do reservation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/31/23 at 11:23am, Leizhen (ThunderTown) wrote:
......
> > +void __init reserve_crashkernel_generic(char *cmdline,
> > +			     unsigned long long crash_size,
> > +			     unsigned long long crash_base,
> > +			     unsigned long long crash_low_size,
> > +			     bool high)
> > +{
> > +	unsigned long long search_end = CRASH_ADDR_LOW_MAX, search_base = 0;
> > +	bool fixed_base = false;
> > +
> > +	/* User specifies base address explicitly. */
> > +	if (crash_base) {
> > +		fixed_base = true;
> > +		search_base = crash_base;
> > +		search_end = crash_base + crash_size;
> > +	}
> > +
> > +	if (high) {
> 
> It might be a little clearer to use "else if (high) {"

Makes sense, will update.

> 
> > +		search_base = CRASH_ADDR_LOW_MAX;
> > +		search_end = CRASH_ADDR_HIGH_MAX;
> > +	}
> > +
> > +retry:
> > +	crash_base = memblock_phys_alloc_range(crash_size, CRASH_ALIGN,
> > +					       search_base, search_end);
......


_______________________________________________
kexec mailing list
kexec@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/kexec



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux