summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWANG Chao <chaowang@redhat.com>2014-04-22 10:56:40 +0800
committerSimon Horman <horms@verge.net.au>2014-04-23 09:11:03 +0900
commit6091da331c1ebc03dae14e0eaf0d1534fac821e1 (patch)
tree0fc134e1c051c5e503eeb6a87a8bb4eda59e538a
parentaf64a074cb28273dcec05467dfd9348387da054d (diff)
downloadkexec-tools-6091da331c1ebc03dae14e0eaf0d1534fac821e1.tar.gz
x86, cleanup: add_memmap() only do alignment check on RANGE_RAM
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. Signed-off-by: WANG Chao <chaowang@redhat.com> Acked-by: Dave Young <dyoung@redhat.com> Tested-by: Linn Crosetto <linn@hp.com> Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r--kexec/arch/i386/crashdump-x86.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c
index dfcce17..6dd2e65 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,
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. */