Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp1051304rdb; Fri, 19 Jan 2024 06:54:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IFpbBIG6Mu0WZCVjiqXSg+sagbiJFPrh9sJtQ074HU47/ynx0OnZfKhvkJWgLXxazc12ebC X-Received: by 2002:a05:6a20:8f05:b0:19a:2c5e:cf7d with SMTP id b5-20020a056a208f0500b0019a2c5ecf7dmr2476611pzk.30.1705676068526; Fri, 19 Jan 2024 06:54:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705676068; cv=pass; d=google.com; s=arc-20160816; b=daUmkHGbjxlq7teVWLPPOY1lMhPQ2CCWAxEoe8Cnx/L3qhFgABCuddb0v9hBvpIZsL wLTQxKMwPC0wJ7PV367VlDJ1u9s0gUIGKnMWsK2EVOI1rbU+RyXcwjdcIW5AWJSrTXR7 rx4ue39G99nuvX9hZtlfkGFhvTjzhwkDUT2lplMFDx1BZN4NH5t0o5Tpo+L6XZrWJWtx +PDsjlGTTsctZjQHJs8M+mJ5zL76tX7KWe1Muc1P4mK9SuVWAnKiGrYb6FFToAlMBrrv XXgkA1p1RxzujsIsmj6KmAWLvpn9aqp7S3uMUMjWGq9+oyJNvHYgoRkk6EclhXHrMCuK Klkg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=idAf8C8vEaEPhamo8i8Q+7QtJLmbWmmoc+K4mQqU0s4=; fh=zRw2lYWZmEZ+xk8Dyhrd0rqHIpogjnUXaVblO2ikfrI=; b=UQY42jhcI/DsKicb40Z4ejzUZrTbD7CH+2ZQ2iDglgkZ98aljiw8VE61pevrz37XeD 6/pkreQZholMhHbev2RQO/IffZeVXE33i7aLSNIwFqEShByRuONm7RjV7bUR3XZqgghJ aPGjLH0xzIKO2nDVtpifC3fE9wJjQ6NMZdLOu0uCKiVU/EezKGoVc0973p6un3lEDMXb y8ZuiychihymvqiEIQZltokGysZvjjnq4yMlq/9NRns7D9BY4WpGaoE0w7vsHsSBymn1 AcOeLHkNM01ByJ+2scsBM5u9PWKyrlXJeZVa7Gjb+nd8g3VuRiNY5bPVjOWrttPW/Pt9 XKIA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=jOFV2Ee8; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-31281-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31281-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id z189-20020a6265c6000000b006d98c793ebdsi5488485pfb.318.2024.01.19.06.54.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 06:54:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-31281-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=jOFV2Ee8; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-31281-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31281-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 287062830D9 for ; Fri, 19 Jan 2024 14:54:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F113053804; Fri, 19 Jan 2024 14:53:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="jOFV2Ee8" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D8CCC54F87 for ; Fri, 19 Jan 2024 14:53:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705676022; cv=none; b=DWofUM5HNdmbDY+vz+qEp2Cwh/RQ0GMgR5OE8MdL5UPGCfdMFFB456QXr95UsTu6SDwDTZBv//llZTy80Hz/zNn02OA5Mhgx5ubp6IBwR4/yXcl0hWgBSCh2qHv8wf0Hx5QTW3tVtJ9nR0xeB49UdzAWU8bFwJsibWluyH9EooI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705676022; c=relaxed/simple; bh=hFskVw87Sdr8raPjNAxR5rfjJTmG9iVV6lVF91D6qJA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-type; b=slzkvM8xvHKk+rLNEBABYIDZiwj12zFtWu/R3FrvHnHMRSRa2qdqg5LbHFTAae7/O8IFPefE3kPzDAdHj07o0zQr0k4KqQilJRVrE06dDBePhgQT/+OvbJmbP14EyMzHI9/Rjb9HR+Ja0+/zDgCelYHnJjg/nLSM/zgImFKzvyM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=jOFV2Ee8; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1705676019; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=idAf8C8vEaEPhamo8i8Q+7QtJLmbWmmoc+K4mQqU0s4=; b=jOFV2Ee8GtkP6uAxijNyhATeiOlZ/1y7Qhw1dUXT1uobRn2bCppeubzGXsi+DQ7Efq4/ME dKkGA0vrQARS+42RNfkib5hDlEPP6kiNHYaMIglY/b/wtVX7ccWQfClC7wNH7Cj1WJ5Z9t MkYWdIEYvm4E0z3BOg1o82LP8KP7YlQ= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-184-YH3KIHVePGC9OEG05Qcb4A-1; Fri, 19 Jan 2024 09:53:33 -0500 X-MC-Unique: YH3KIHVePGC9OEG05Qcb4A-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A44A81C54032; Fri, 19 Jan 2024 14:53:32 +0000 (UTC) Received: from MiWiFi-R3L-srv.redhat.com (unknown [10.72.116.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9DE6951D5; Fri, 19 Jan 2024 14:53:26 +0000 (UTC) From: Baoquan He To: linux-kernel@vger.kernel.org Cc: kexec@lists.infradead.org, x86@kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-mips@vger.kernel.org, linux-riscv@lists.infradead.org, loongarch@lists.linux.dev, akpm@linux-foundation.org, ebiederm@xmission.com, hbathini@linux.ibm.com, piliu@redhat.com, viro@zeniv.linux.org.uk, Baoquan He Subject: [PATCH v2 05/14] crash: clean up kdump related config items Date: Fri, 19 Jan 2024 22:52:32 +0800 Message-ID: <20240119145241.769622-6-bhe@redhat.com> In-Reply-To: <20240119145241.769622-1-bhe@redhat.com> References: <20240119145241.769622-1-bhe@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-type: text/plain Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 By splitting CRASH_RESERVE and VMCORE_INFO out from CRASH_CORE, cleaning up the dependency of FA_DMUMP on CRASH_DUMP, and moving crash codes from kexec_core.c to crash_core.c, now we can rearrange CRASH_DUMP to depend on KEXEC_CORE, and make CRASH_DUMP select CRASH_RESERVE and VMCORE_INFO. KEXEC_CORE won't select CRASH_RESERVE and VMCORE_INFO any more because KEXEC_CORE enables codes which allocate control pages, copy kexec/kdump segments, and prepare for switching. These codes are shared by both kexec reboot and crash dumping. Doing this makes codes and the corresponding config items more logical (the right item depends on or is selected by the left item). PROC_KCORE -----------> VMCORE_INFO |----------> VMCORE_INFO FA_DUMP----| |----------> CRASH_RESERVE ---->VMCORE_INFO / |---->CRASH_RESERVE KEXEC --| /| |--> KEXEC_CORE--> CRASH_DUMP-->/-|---->PROC_VMCORE KEXEC_FILE --| \ | \---->CRASH_HOTPLUG KEXEC --| |--> KEXEC_CORE--> kexec reboot KEXEC_FILE --| Signed-off-by: Baoquan He --- kernel/Kconfig.kexec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kernel/Kconfig.kexec b/kernel/Kconfig.kexec index 8faf27043432..6c34e63c88ff 100644 --- a/kernel/Kconfig.kexec +++ b/kernel/Kconfig.kexec @@ -9,8 +9,6 @@ config VMCORE_INFO bool config KEXEC_CORE - select VMCORE_INFO - select CRASH_RESERVE bool config KEXEC_ELF @@ -99,8 +97,11 @@ config KEXEC_JUMP config CRASH_DUMP bool "kernel crash dumps" + default y depends on ARCH_SUPPORTS_CRASH_DUMP - select KEXEC_CORE + depends on KEXEC_CORE + select VMCORE_INFO + select CRASH_RESERVE help Generate crash dump after being started by kexec. This should be normally only set in special crash dump kernels -- 2.41.0