From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mx1.redhat.com ([209.132.183.28]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WYR8c-0007ej-HI for kexec@lists.infradead.org; Fri, 11 Apr 2014 02:24:19 +0000 From: WANG Chao Subject: [PATCH RESEND v5 04/10] x86, cleanup: add_memmap() only do alignment check on RANGE_RAM Date: Fri, 11 Apr 2014 10:23:25 +0800 Message-Id: <1397183011-1526-5-git-send-email-chaowang@redhat.com> In-Reply-To: <1397183011-1526-1-git-send-email-chaowang@redhat.com> References: <1397183011-1526-1-git-send-email-chaowang@redhat.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kexec" Errors-To: kexec-bounces+dwmw2=twosheds.infradead.org@lists.infradead.org To: horms@verge.net.au, vgoyal@redhat.com, ebiederm@xmission.com, hpa@zytor.com, trenn@suse.de, dyoung@redhat.com, linn@hp.com Cc: kexec@lists.infradead.org Signed-off-by: WANG Chao --- 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 _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec