-From 3d285550c826be5932807857b21b22d8296a8b4a Mon Sep 17 00:00:00 2001
-From: Geoff Levand <geoff@infradead.org>
-Date: Fri, 9 May 2014 13:45:10 -0700
+From 98215763db92c85668fd217cfc719322ce54e704 Mon Sep 17 00:00:00 2001
+From: Geoff Levand <geoff.levand@linaro.org>
+Date: Tue, 13 May 2014 10:59:52 -0700
 Subject: [PATCH 1/1] Add arm64 support
 
-Signed-off-by: Geoff Levand <geoff@infradead.org>
+Signed-off-by: Geoff Levand <geoff.levand@linaro.org>
+Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
 ---
- configure.ac                            |   3 +
- kexec/Makefile                          |   1 +
- kexec/arch/arm64/Makefile               |  31 +++++
- kexec/arch/arm64/include/arch/options.h |  30 +++++
- kexec/arch/arm64/kexec-arm64.c          | 228 ++++++++++++++++++++++++++++++++
- kexec/arch/arm64/kexec-arm64.h          |  28 ++++
- kexec/arch/arm64/kexec-elf-arm64.c      | 147 ++++++++++++++++++++
- kexec/kexec-syscall.h                   |   9 +-
- 8 files changed, 475 insertions(+), 2 deletions(-)
+ configure.ac                            |    3 
+ kexec/Makefile                          |    1 
+ kexec/arch/arm64/Makefile               |   31 +++++
+ kexec/arch/arm64/include/arch/options.h |   30 ++++
+ kexec/arch/arm64/kexec-arm64.c          |  194 ++++++++++++++++++++++++++++++++
+ kexec/arch/arm64/kexec-arm64.h          |   28 ++++
+ kexec/arch/arm64/kexec-elf-arm64.c      |  147 ++++++++++++++++++++++++
+ kexec/kexec-syscall.h                   |    9 +
+ 8 files changed, 441 insertions(+), 2 deletions(-)
  create mode 100644 kexec/arch/arm64/Makefile
  create mode 100644 kexec/arch/arm64/include/arch/options.h
  create mode 100644 kexec/arch/arm64/kexec-arm64.c
  create mode 100644 kexec/arch/arm64/kexec-arm64.h
  create mode 100644 kexec/arch/arm64/kexec-elf-arm64.c
 
-diff --git a/configure.ac b/configure.ac
-index 31d1bbe..c6e8bd6 100644
 --- a/configure.ac
 +++ b/configure.ac
 @@ -35,6 +35,9 @@ case $target_cpu in
  		ARCH="ppc64"
  		SUBARCH="LE"
  		;;
-+	aarch64 )
++	aarch64* )
 +		ARCH="arm64"
 +		;;
  	arm* )
  		ARCH="arm"
  		;;
-diff --git a/kexec/Makefile b/kexec/Makefile
-index 7d3175b..9777ec3 100644
 --- a/kexec/Makefile
 +++ b/kexec/Makefile
 @@ -71,6 +71,7 @@ KEXEC_SRCS			+= $($(ARCH)_FS2DT)

+	fp = fopen(iomem, "r");
+
+	if (!fp) {
+		fprintf(stderr, "Cannot open %s: %s\n",
+			iomem, strerror(errno));
+		return -1;
+	}
+

 include $(srcdir)/kexec/arch/i386/Makefile
 include $(srcdir)/kexec/arch/ia64/Makefile
 include $(srcdir)/kexec/arch/m68k/Makefile
--- /dev/null
+++ b/kexec/arch/arm64/Makefile
@@ -0,0 +1,31 @@
