Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752048AbbLHV70 (ORCPT ); Tue, 8 Dec 2015 16:59:26 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:39170 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751982AbbLHV7W (ORCPT ); Tue, 8 Dec 2015 16:59:22 -0500 From: Daniel Kiper To: kexec@lists.infradead.org, linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org Cc: andrew.cooper3@citrix.com, david.vrabel@citrix.com, horms@verge.net.au, keir@xen.org, konrad.wilk@oracle.com Subject: [PATCH 13/14] crashdump/sh: Add print_crashkernel_region_size() function Date: Tue, 8 Dec 2015 22:57:46 +0100 Message-Id: <1449611867-15672-14-git-send-email-daniel.kiper@oracle.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1449611867-15672-1-git-send-email-daniel.kiper@oracle.com> References: <1449611867-15672-1-git-send-email-daniel.kiper@oracle.com> X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 965 Lines: 33 Follow similar x86 patch. Signed-off-by: Daniel Kiper --- kexec/arch/sh/crashdump-sh.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/kexec/arch/sh/crashdump-sh.c b/kexec/arch/sh/crashdump-sh.c index 9e6af6b..6556eb1 100644 --- a/kexec/arch/sh/crashdump-sh.c +++ b/kexec/arch/sh/crashdump-sh.c @@ -178,3 +178,13 @@ int is_crashkernel_mem_reserved(void) return parse_iomem_single("Crash kernel\n", &start, &end) == 0 ? (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"); +} -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/