Blame SOURCES/kexec-tools-2.0.8-bugfix-calc-correct-end-address-of-memory-ranges-in-.patch

a6d77e
From 0ed5f4fb8dfd33bc52c8dbe15c61285d50c769b2 Mon Sep 17 00:00:00 2001
a6d77e
Message-Id: <0ed5f4fb8dfd33bc52c8dbe15c61285d50c769b2.1431592766.git.panand@redhat.com>
a6d77e
In-Reply-To: <1fb6841aa15407dbf371589d7abca7bc2d35815c.1431592766.git.panand@redhat.com>
a6d77e
References: <1fb6841aa15407dbf371589d7abca7bc2d35815c.1431592766.git.panand@redhat.com>
a6d77e
From: AKASHI Takahiro <takahiro.akashi@linaro.org>
a6d77e
Date: Fri, 22 Aug 2014 13:48:52 +0900
a6d77e
Subject: [PATCH 06/17] (bugfix) calc correct end address of memory ranges in
a6d77e
 device tree
a6d77e
a6d77e
The end address of "reg" attribute in device tree's memory should be
a6d77e
inclusive.
a6d77e
---
a6d77e
 kexec/fs2dt.c | 5 +++--
a6d77e
 1 file changed, 3 insertions(+), 2 deletions(-)
a6d77e
a6d77e
diff --git a/kexec/fs2dt.c b/kexec/fs2dt.c
a6d77e
index 1e5f074da8b2..3ba217873f4f 100644
a6d77e
--- a/kexec/fs2dt.c
a6d77e
+++ b/kexec/fs2dt.c
a6d77e
@@ -234,7 +234,8 @@ static void add_dyn_reconf_usable_mem_property__(int fd)
a6d77e
 						    ranges_size*8);
a6d77e
 				}
a6d77e
 				ranges[rlen++] = cpu_to_be64(loc_base);
a6d77e
-				ranges[rlen++] = cpu_to_be64(loc_end - loc_base);
a6d77e
+				ranges[rlen++] = cpu_to_be64(loc_end
a6d77e
+								- loc_base + 1);
a6d77e
 				rngs_cnt++;
a6d77e
 			}
a6d77e
 		}
a6d77e
@@ -348,7 +349,7 @@ static void add_usable_mem_property(int fd, size_t len)
a6d77e
 					    ranges_size*sizeof(*ranges));
a6d77e
 			}
a6d77e
 			ranges[rlen++] = cpu_to_be64(loc_base);
a6d77e
-			ranges[rlen++] = cpu_to_be64(loc_end - loc_base);
a6d77e
+			ranges[rlen++] = cpu_to_be64(loc_end - loc_base + 1);
a6d77e
 		}
a6d77e
 	}
a6d77e
 
a6d77e
-- 
a6d77e
2.1.0
a6d77e