This is the last piece of my kexec_file_load implementation for arm64.
It is now ready for being merged as some relevant patch to dtc/libfdt[1]
has finally been integrated in v5.3-rc1.
(Nothing changed since kexec_file v16[2] except adding Patch#1 and #2.)
Patch#1 and #2 are preliminary patches for libfdt component.
Patch#3 is to add kdump support.
Bhepesh's patch[3] will be required for 52-bit VA support.
Once this patch is applied, whether or not CONFIG_ARM64_VA_BITS_52 is
enabled or not, a matching fix on user space side, crash utility,
will also be needed.
Anyway, I tested my patch, at least, with the following configuration:
1) CONFIG_ARM64_BITS_48=y
2) CONFIG_ARM64_BITS_52=y, but vabits_actual=48
(I don't have any platform to use for
3) CONFIG_ARM64_BITS_52=y, and vabits_actual=52)
[1] commit 9bb9c6a110ea ("scripts/dtc: Update to upstream version
v1.5.0-23-g87963ee20693"), in particular
7fcf8208b8a9 libfdt: add fdt_append_addrrange()
[2] http://lists.infradead.org/pipermail/linux-arm-kernel/2018-November/612641.html
[3] http://lists.infradead.org/pipermail/linux-arm-kernel/2019-November/693411.html
Changes in v2 (Nov 14, 2019)
* rebased to v5.4-rc7
* no functional changes
AKASHI Takahiro (3):
libfdt: define UINT32_MAX in libfdt_env.h
libfdt: include fdt_addresses.c
arm64: kexec_file: add crash dump support
arch/arm64/include/asm/kexec.h | 4 +
arch/arm64/kernel/kexec_image.c | 4 -
arch/arm64/kernel/machine_kexec_file.c | 106 ++++++++++++++++++++++++-
include/linux/libfdt_env.h | 3 +
lib/Makefile | 2 +-
lib/fdt_addresses.c | 2 +
6 files changed, 112 insertions(+), 9 deletions(-)
create mode 100644 lib/fdt_addresses.c
--
2.21.0
In the implementation of kexec_file_loaded-based kdump for arm64,
fdt_appendprop_addrrange() will be needed.
So include fdt_addresses.c in making libfdt.
Signed-off-by: AKASHI Takahiro <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Frank Rowand <[email protected]>
---
lib/Makefile | 2 +-
lib/fdt_addresses.c | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
create mode 100644 lib/fdt_addresses.c
diff --git a/lib/Makefile b/lib/Makefile
index c5892807e06f..1587a2de99c6 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -220,7 +220,7 @@ KASAN_SANITIZE_stackdepot.o := n
KCOV_INSTRUMENT_stackdepot.o := n
libfdt_files = fdt.o fdt_ro.o fdt_wip.o fdt_rw.o fdt_sw.o fdt_strerror.o \
- fdt_empty_tree.o
+ fdt_empty_tree.o fdt_addresses.o
$(foreach file, $(libfdt_files), \
$(eval CFLAGS_$(file) = -I $(srctree)/scripts/dtc/libfdt))
lib-$(CONFIG_LIBFDT) += $(libfdt_files)
diff --git a/lib/fdt_addresses.c b/lib/fdt_addresses.c
new file mode 100644
index 000000000000..23610bcf390b
--- /dev/null
+++ b/lib/fdt_addresses.c
@@ -0,0 +1,2 @@
+#include <linux/libfdt_env.h>
+#include "../scripts/dtc/libfdt/fdt_addresses.c"
--
2.21.0
Hi Akashi,
Thanks for the patchset.
On 11/14/2019 10:45 AM, AKASHI Takahiro wrote:
> This is the last piece of my kexec_file_load implementation for arm64.
> It is now ready for being merged as some relevant patch to dtc/libfdt[1]
> has finally been integrated in v5.3-rc1.
> (Nothing changed since kexec_file v16[2] except adding Patch#1 and #2.)
>
> Patch#1 and #2 are preliminary patches for libfdt component.
> Patch#3 is to add kdump support.
>
> Bhepesh's patch[3] will be required for 52-bit VA support.
> Once this patch is applied, whether or not CONFIG_ARM64_VA_BITS_52 is
> enabled or not, a matching fix on user space side, crash utility,
> will also be needed.
>
> Anyway, I tested my patch, at least, with the following configuration:
> 1) CONFIG_ARM64_BITS_48=y
> 2) CONFIG_ARM64_BITS_52=y, but vabits_actual=48
>
> (I don't have any platform to use for
> 3) CONFIG_ARM64_BITS_52=y, and vabits_actual=52)
>
> [1] commit 9bb9c6a110ea ("scripts/dtc: Update to upstream version
> v1.5.0-23-g87963ee20693"), in particular
> 7fcf8208b8a9 libfdt: add fdt_append_addrrange()
> [2] http://lists.infradead.org/pipermail/linux-arm-kernel/2018-November/612641.html
> [3] http://lists.infradead.org/pipermail/linux-arm-kernel/2019-November/693411.html
>
> Changes in v2 (Nov 14, 2019)
> * rebased to v5.4-rc7
> * no functional changes
This looks like a step in the right direction. I have some minor
nitpicks which I have mentioned in the individual patch reviews.
With those addressed (v2?):
Tested-and-Reviewed-by: Bhupesh Sharma <[email protected]>
Thanks,
Bhupesh
> AKASHI Takahiro (3):
> libfdt: define UINT32_MAX in libfdt_env.h
> libfdt: include fdt_addresses.c
> arm64: kexec_file: add crash dump support
>
> arch/arm64/include/asm/kexec.h | 4 +
> arch/arm64/kernel/kexec_image.c | 4 -
> arch/arm64/kernel/machine_kexec_file.c | 106 ++++++++++++++++++++++++-
> include/linux/libfdt_env.h | 3 +
> lib/Makefile | 2 +-
> lib/fdt_addresses.c | 2 +
> 6 files changed, 112 insertions(+), 9 deletions(-)
> create mode 100644 lib/fdt_addresses.c
>