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

Simon Horman horms at verge.net.au
Sun Apr 13 19:13:51 PDT 2014


Could you please explain why this is necessary.

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.

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
> 



More information about the kexec mailing list