From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from userp1040.oracle.com ([156.151.31.81]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cap8x-0000Ht-Ln for kexec@lists.infradead.org; Mon, 06 Feb 2017 19:40:16 +0000 From: Eric DeVolder Subject: [PATCH v2 06/12] crashdump/mips: Add print_crashkernel_region_size() function Date: Mon, 6 Feb 2017 13:42:18 -0600 Message-Id: <1486410144-28595-7-git-send-email-eric.devolder@oracle.com> In-Reply-To: <1486410144-28595-1-git-send-email-eric.devolder@oracle.com> References: <1486410144-28595-1-git-send-email-eric.devolder@oracle.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kexec" Errors-To: kexec-bounces+dwmw2=infradead.org@lists.infradead.org To: horms@verge.net.au, kexec@lists.infradead.org, andrew.cooper3@citrix.com, dyoung@redhat.com Cc: daniel.kiper@oracle.com, konrad.wilk@oracle.com From: Daniel Kiper Follow similar x86 patch. Signed-off-by: Daniel Kiper Signed-off-by: Eric DeVolder --- kexec/arch/mips/crashdump-mips.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/kexec/arch/mips/crashdump-mips.c b/kexec/arch/mips/crashdump-mips.c index d6cff5a..594e1b9 100644 --- a/kexec/arch/mips/crashdump-mips.c +++ b/kexec/arch/mips/crashdump-mips.c @@ -385,3 +385,12 @@ int is_crashkernel_mem_reserved(void) (start != end) : 0; } +void print_crashkernel_region_size(void) +{ + uint64_t start, end; + + if (!parse_iomem_single("Crash kernel\n", &start, &end) && start != end) + printf("%lu\n", end - start + 1); + else + printf("0\n"); +} -- 2.7.4 _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec