blob: 60836e96bbf428b38ce7f20d15f217d702645d94 [file] [log] [blame]
From ltsi-dev-bounces@lists.linuxfoundation.org Mon May 28 02:48:04 2012
From: "Shimoda, Yoshihiro" <yoshihiro.shimoda.uh@renesas.com>
Date: Mon, 28 May 2012 18:48:00 +0900
Subject: [LTSI-dev] [PATCH 20/21] sh: kexec: Register crashk_res
To: ltsi-dev@lists.linuxfoundation.org
Message-ID: <4FC349D0.4060007@renesas.com>
>From c6776324925d4d939667e9a7dd28079b35349e98 Mon Sep 17 00:00:00 2001
From: Simon Horman <horms@verge.net.au>
Date: Fri, 2 Sep 2011 03:47:12 +0000
Subject: sh: kexec: Register crashk_res
Register crashk_res so that it can be used by kexec-tools
via /proc/iomem.
The crash kernel resource needs to be requested the same as the
other kernel resources due to the fact that it's handled during
the common path for adding new memory ranges, so it's added in to
__add_active_range() with the others. This ensures that the crash
kernel is properly reserved regardless of which memory range it's
placed in.
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
(cherry picked from commit 41309b7a22805f1650c600723d729af453d52719)
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
arch/sh/kernel/setup.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
index 58bff45..1a0e946 100644
--- a/arch/sh/kernel/setup.c
+++ b/arch/sh/kernel/setup.c
@@ -211,13 +211,16 @@ void __init __add_active_range(unsigned int nid, unsigned long start_pfn,
}
/*
- * We don't know which RAM region contains kernel data,
- * so we try it repeatedly and let the resource manager
- * test it.
+ * We don't know which RAM region contains kernel data or
+ * the reserved crashkernel region, so try it repeatedly
+ * and let the resource manager test it.
*/
request_resource(res, &code_resource);
request_resource(res, &data_resource);
request_resource(res, &bss_resource);
+#ifdef CONFIG_KEXEC
+ request_resource(res, &crashk_res);
+#endif
/*
* Also make sure that there is a PMB mapping that covers this
--
1.7.1
_______________________________________________
LTSI-dev mailing list
LTSI-dev@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/ltsi-dev