[PATCH RESEND v5 04/10] x86, cleanup: add_memmap() only do alignment check on RANGE_RAM

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

 



On 04/14/14 at 11:13am, Simon Horman wrote:
> Could you please explain why this is necessary.

add_memmap() will also add memory range with type RANGE_ACPI and
RANGE_ACPI_NVS (RANGE_RESERVED in the future) besides RANGE_RAM to
memmap_p.

Among these types of memory range, only RANGE_RAM needs to
be aligned with certain alignment. RANGE_ACPI, RANGE_ACPI_NVS and
RANGE_RESERVED doesn't have to be aligned.

I'll add above comment to the patch description.

> 
> Also, it seems to me that it would make sense to move this
> patch so that is is immediately after patch 2 in the series.

Will do.

> 
> On Fri, Apr 11, 2014 at 10:23:25AM +0800, WANG Chao wrote:
> > Signed-off-by: WANG Chao <chaowang at redhat.com>
> > ---
> >  kexec/arch/i386/crashdump-x86.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c
> > index 43eb8f7..4072c10 100644
> > --- a/kexec/arch/i386/crashdump-x86.c
> > +++ b/kexec/arch/i386/crashdump-x86.c
> > @@ -482,8 +482,8 @@ static int add_memmap(struct memory_range *memmap_p, int *nr_memmap_p,
> >  	int i, j, nr_entries = 0, tidx = 0, align = 1024;
> >  	unsigned long long mstart, mend;
> >  
> > -	/* Do alignment check. */
> > -	if ((addr%align) || (size%align))
> > +	/* Do alignment check if it's RANGE_RAM */
> > +	if ((type == RANGE_RAM) && ((addr%align) || (size%align)))
> >  		return -1;
> >  
> >  	/* Make sure at least one entry in list is free. */
> > -- 
> > 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