Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755602AbcKJL53 (ORCPT ); Thu, 10 Nov 2016 06:57:29 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:34195 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755195AbcKJL51 (ORCPT ); Thu, 10 Nov 2016 06:57:27 -0500 Subject: [PATCH 0/3] kexec/fadump: remove dependency with CONFIG_KEXEC and reuse crashkernel parameter for fadump From: Hari Bathini To: linux-kernel@vger.kernel.org Cc: fenghua.yu@intel.com, tony.luck@intel.com, linux-ia64@vger.kernel.org, dyoung@redhat.com, kexec@lists.infradead.org, Mahesh J Salgaonkar , ebiederm@xmission.com, Michael Ellerman , linuxppc-dev@lists.ozlabs.org, vgoyal@redhat.com Date: Thu, 10 Nov 2016 17:27:10 +0530 User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16111011-0012-0000-0000-000001E70757 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16111011-0013-0000-0000-00000667CB4F Message-Id: <147877899077.31483.3740501843050856595.stgit@hbathini.in.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-11-10_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1611100224 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2304 Lines: 43 Traditionally, kdump is used to save vmcore in case of a crash. Some architectures like powerpc can save vmcore using architecture specific support instead of kexec/kdump mechanism. Such architecture specific support also needs to reserve memory, to be used by dump capture kernel. crashkernel parameter can be a reused, for memory reservation, by such architecture specific infrastructure. This patchset removes dependency with CONFIG_KEXEC for crashkernel parameter and vmcoreinfo related code as it can be reused without kexec support. Also, crashkernel parameter is reused instead of fadump_reserve_mem to reserve memory for fadump. The first patch moves crashkernel parameter parsing and vmcoreinfo related code under CONFIG_CRASH_CORE instead of CONFIG_KEXEC_CORE to reuse without depending on it. The second patch reuses crashkernel for reserving memory for fadump instead of fadump_reserve_mem. This has the advantage of using all the syntaxes crashkernel supports, for fadump as well. The third patch updates fadump kernel documentation about use of crashkernel parameter. --- Hari Bathini (3): crash: move crashkernel parsing and vmcore related code under CONFIG_CRASH_CORE powerpc/fadump: reuse crashkernel parameter for fadump memory reservation powerpc/fadump: update documentation about crashkernel parameter reuse Documentation/powerpc/firmware-assisted-dump.txt | 23 + arch/Kconfig | 4 arch/ia64/kernel/crash.c | 22 - arch/powerpc/Kconfig | 10 arch/powerpc/include/asm/fadump.h | 2 arch/powerpc/kernel/crash.c | 2 arch/powerpc/kernel/fadump.c | 57 +-- arch/powerpc/kernel/setup-common.c | 5 include/linux/crash_core.h | 75 ++++ include/linux/kexec.h | 63 --- kernel/Makefile | 1 kernel/crash_core.c | 450 ++++++++++++++++++++++ kernel/kexec_core.c | 435 --------------------- 13 files changed, 575 insertions(+), 574 deletions(-) create mode 100644 include/linux/crash_core.h create mode 100644 kernel/crash_core.c