From: AKASHI Takahiro <takahiro.aka...@linaro.org>

The end address of "reg" attribute in device tree's memory should be
inclusive.

From: AKASHI Takahiro <takahiro.aka...@linaro.org>
Signed-off-by: Geoff Levand <ge...@infradead.org>
---
 kexec/fs2dt.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/kexec/fs2dt.c b/kexec/fs2dt.c
index 6ed2399..f00fd98 100644
--- a/kexec/fs2dt.c
+++ b/kexec/fs2dt.c
@@ -236,7 +236,8 @@ static void add_dyn_reconf_usable_mem_property__(int fd)
                                                    ranges_size*8);
                                }
                                ranges[rlen++] = cpu_to_be64(loc_base);
-                               ranges[rlen++] = cpu_to_be64(loc_end - 
loc_base);
+                               ranges[rlen++] = cpu_to_be64(loc_end
+                                                               - loc_base + 1);
                                rngs_cnt++;
                        }
                }
@@ -350,7 +351,7 @@ static void add_usable_mem_property(int fd, size_t len)
                                            ranges_size*sizeof(*ranges));
                        }
                        ranges[rlen++] = cpu_to_be64(loc_base);
-                       ranges[rlen++] = cpu_to_be64(loc_end - loc_base);
+                       ranges[rlen++] = cpu_to_be64(loc_end - loc_base + 1);
                }
        }
 
-- 
2.5.0



_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

Reply via email to