|
|
e35838 |
From edc4648e608533e05f323b5682ab98ebd37eacca Mon Sep 17 00:00:00 2001
|
|
|
e35838 |
Message-Id: <edc4648e608533e05f323b5682ab98ebd37eacca.1469447235.git.panand@redhat.com>
|
|
|
e35838 |
From: Pratyush Anand <panand@redhat.com>
|
|
|
e35838 |
Date: Thu, 30 Jun 2016 23:16:18 +0530
|
|
|
e35838 |
Subject: [PATCH] arm64: prefer reading memory ranges from iomem over fdt
|
|
|
e35838 |
|
|
|
e35838 |
Some of the fdt might not have correct memory ranges defined in "memory"
|
|
|
e35838 |
nodes. For example: apm-mustang.dts expects boot loader to update "memory"
|
|
|
e35838 |
node with appropriate value.
|
|
|
e35838 |
|
|
|
e35838 |
Now, what if boot loader /firmware does not update it. Offcourse, its an
|
|
|
e35838 |
issue in firmware. But, since we will always have more updated memory
|
|
|
e35838 |
ranges in /proc/iomem, so prefer to read it from there.
|
|
|
e35838 |
|
|
|
e35838 |
Specifically, after kernel commit 500899c2cc3e3f06140373b587a69d30650f2d9d,
|
|
|
e35838 |
it becomes important to work kexec with such buggy firmware.
|
|
|
e35838 |
|
|
|
e35838 |
Signed-off-by: Pratyush Anand <panand@redhat.com>
|
|
|
e35838 |
---
|
|
|
e35838 |
kexec/arch/arm64/kexec-arm64.c | 4 ++--
|
|
|
e35838 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
e35838 |
|
|
|
e35838 |
diff --git a/kexec/arch/arm64/kexec-arm64.c b/kexec/arch/arm64/kexec-arm64.c
|
|
|
e35838 |
index f936dd2de458..d1fdd64a60c2 100644
|
|
|
e35838 |
--- a/kexec/arch/arm64/kexec-arm64.c
|
|
|
e35838 |
+++ b/kexec/arch/arm64/kexec-arm64.c
|
|
|
e35838 |
@@ -1016,10 +1016,10 @@ int get_memory_ranges(struct memory_range **range, int *ranges,
|
|
|
e35838 |
unsigned int count;
|
|
|
e35838 |
int result;
|
|
|
e35838 |
|
|
|
e35838 |
- result = get_memory_ranges_dt(array, &count);
|
|
|
e35838 |
+ result = get_memory_ranges_iomem(array, &count);
|
|
|
e35838 |
|
|
|
e35838 |
if (result)
|
|
|
e35838 |
- result = get_memory_ranges_iomem(array, &count);
|
|
|
e35838 |
+ result = get_memory_ranges_dt(array, &count);
|
|
|
e35838 |
|
|
|
e35838 |
*range = result ? NULL : array;
|
|
|
e35838 |
*ranges = result ? 0 : count;
|
|
|
e35838 |
--
|
|
|
e35838 |
2.5.5
|
|
|
e35838 |
|