All of lore.kernel.org
 help / color / mirror / Atom feed
From: geoff@infradead.org (Geoff Levand)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/4] kexec: (bugfix) calc correct end address of memory ranges in device tree
Date: Tue, 26 Jul 2016 20:18:57 +0000	[thread overview]
Message-ID: <c4af21ba365767f88a2516719dd0f3b70777b549.1469559530.git.geoff@infradead.org> (raw)
In-Reply-To: <cover.1469559530.git.geoff@infradead.org>

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

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

From: AKASHI Takahiro <takahiro.akashi@linaro.org>
Signed-off-by: Geoff Levand <geoff@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

WARNING: multiple messages have this Message-ID (diff)
From: Geoff Levand <geoff@infradead.org>
To: Simon Horman <horms@verge.net.au>
Cc: Pratyush Anand <panand@redhat.com>,
	AKASHI Takahiro <takahiro.akashi@linaro.org>,
	kexec@lists.infradead.org, linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/4] kexec: (bugfix) calc correct end address of memory ranges in device tree
Date: Tue, 26 Jul 2016 20:18:57 +0000	[thread overview]
Message-ID: <c4af21ba365767f88a2516719dd0f3b70777b549.1469559530.git.geoff@infradead.org> (raw)
In-Reply-To: <cover.1469559530.git.geoff@infradead.org>

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

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

From: AKASHI Takahiro <takahiro.akashi@linaro.org>
Signed-off-by: Geoff Levand <geoff@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	other threads:[~2016-07-26 20:18 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-26 20:18 [PATCH v2 0/4] arm64 kexec-tools patches Geoff Levand
2016-07-26 20:18 ` Geoff Levand
2016-07-26 20:18 ` Geoff Levand [this message]
2016-07-26 20:18   ` [PATCH v2 1/4] kexec: (bugfix) calc correct end address of memory ranges in device tree Geoff Levand
2016-07-26 20:18 ` [PATCH v2 2/4] kexec: Add common device tree routines Geoff Levand
2016-07-26 20:18   ` Geoff Levand
2016-07-26 20:18 ` [PATCH v2 3/4] arm64: Add arm64 kexec support Geoff Levand
2016-07-26 20:18   ` Geoff Levand
2016-07-28  4:10   ` Pratyush Anand
2016-07-28  4:10     ` Pratyush Anand
2016-07-28 17:33     ` Geoff Levand
2016-07-28 17:33       ` Geoff Levand
2016-07-26 20:18 ` [PATCH v2 4/4] arm64: Add support for binary image files Geoff Levand
2016-07-26 20:18   ` Geoff Levand
2016-07-28  4:01   ` Pratyush Anand
2016-07-28  4:01     ` Pratyush Anand
2016-07-28 18:04     ` Geoff Levand
2016-07-28 18:04       ` Geoff Levand
2016-07-29  3:35       ` Pratyush Anand
2016-07-29  3:35         ` Pratyush Anand
2016-07-29 17:02         ` Geoff Levand
2016-07-29 17:02           ` Geoff Levand
2016-07-29 17:15           ` Pratyush Anand
2016-07-29 17:15             ` Pratyush Anand
2016-07-29 17:19             ` Geoff Levand
2016-07-29 17:19               ` Geoff Levand
2016-08-04  4:51             ` AKASHI Takahiro
2016-08-04  4:51               ` AKASHI Takahiro
2016-08-04  5:11               ` Pratyush Anand
2016-08-04  5:11                 ` Pratyush Anand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c4af21ba365767f88a2516719dd0f3b70777b549.1469559530.git.geoff@infradead.org \
    --to=geoff@infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.