[PATCH v5 03/10] x86, cleanup: add other types of memory range for 2nd kernel boot to memmap_p

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

 



On 04/11/14 at 10:24am, Dave Young wrote:
> On 04/10/14 at 05:12pm, WANG Chao wrote:
> > Now memmap_p contains all the memory range for 2nd kernel boot.
> 
> Hi, the patch description is not infomative, I still do not get the idea
> why this patch is need, what it is doing..
> 
> > 
> > Signed-off-by: WANG Chao <chaowang at redhat.com>
> > ---
> >  kexec/arch/i386/crashdump-x86.c | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> > 
> > diff --git a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c
> > index e695eaf..43eb8f7 100644
> > --- a/kexec/arch/i386/crashdump-x86.c
> > +++ b/kexec/arch/i386/crashdump-x86.c
> > @@ -1006,12 +1006,15 @@ int load_crashdump_segments(struct kexec_info *info, char* mod_cmdline,
> >  
> >  	/* Inform second kernel about the presence of ACPI tables. */
> >  	for (i = 0; i < CRASH_MAX_MEMORY_RANGES; i++) {
> > -		unsigned long start, end;
> > +		unsigned long start, end, size, type;
> >  		if ( !( mem_range[i].type == RANGE_ACPI
> >  			|| mem_range[i].type == RANGE_ACPI_NVS) )
> >  			continue;
> >  		start = mem_range[i].start;
> >  		end = mem_range[i].end;
> > +		type = mem_range[i].type;
> > +		size = end - start;
> 
> Probably size = end - start + 1;

Right. end is inclusive. Will fix.

> 
> > +		add_memmap(memmap_p, &nr_memmap_p, start, size, type);
> >  		cmdline_add_memmap_acpi(mod_cmdline, start, end);
> >  	}
> >  	return 0;
> > -- 
> > 1.8.5.3
> > 



[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