Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp910837rdb; Tue, 23 Jan 2024 21:14:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IGf+sTvIJUCYTpcSixtdw/f2poXjxn0aCQlGzJnvZcZGXAZBI05R4+o8ycpmcb/mQzFalcd X-Received: by 2002:a17:907:a704:b0:a2c:c4e5:65b with SMTP id vw4-20020a170907a70400b00a2cc4e5065bmr581868ejc.10.1706073276575; Tue, 23 Jan 2024 21:14:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706073276; cv=pass; d=google.com; s=arc-20160816; b=hd2YLM/D1pnPcjjhzHeyE+S2+6QD2YrCdCEKvRHG6Li4ZrvmsvJMEue1hEnHlqyVx1 Gn5WMJgDQXiqo/szZrZjzNGB2c9ppnHMBEA0r2cnXhmb8vMj41ljQh9NI2wOeBiYCd5n EKctTgyVXZOqJAZn3S5AY4YVMB0yH3vEkcp0wyoiIA52rpdV3gC2iSlYxzbfNmIQ8JKR hXvKe28Vq1GjIfsrYqNyE2acnNSqK+i7zVPsrUTahG+dY5DnsIOVlZz9WsOJczkx4Awf Mdubv1bAQGksiXl/9ctqYaUQRLfnPb3+fM1G1TNMUGoBzNWA7Rv0SndG4AaRx+Tps2nd 5WCg== 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=zeCVXtTv7PdJ8B2pcMWmbLFUlsrhO+4Ah6Ggve2OhlZmqSfCl5iZ44hR52cKO78AWJ 5OcLcQwD0AOfR0nSJeGCnUwGJ5Jb3J5F2XzLfc1CFRBN2tlw/OWrTgvngJGME/92pQxw Rh7FlmJTMmkRFhUMeez9qOC58MJJVxk4GgyrTS4sac2ZEBXIpQ302FPI6LaXIGei9+75 QqmpdLlP4RL/ZLroWScgwc2LTRTPf1Ifb40r59eorg88bmOOTSksfQDyH4A38R6bMUBk 9L9o3P0+NNNBobPKIK4xYTbKICeBxogWfHdWI/4q0aMz0JE4XjWpto1gyslMugTYFqBS vimQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=cmDB7FFl; 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-36453-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-36453-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id u2-20020a17090626c200b00a28f25ea427si12783685ejc.1011.2024.01.23.21.14.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 21:14:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-36453-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=cmDB7FFl; 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-36453-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-36453-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 588481F2A78E for ; Wed, 24 Jan 2024 05:14:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E121C16429; Wed, 24 Jan 2024 05:13:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="cmDB7FFl" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.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 89FE9F50A for ; Wed, 24 Jan 2024 05:13:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706073229; cv=none; b=WfCZXFa/gr+yBNZ/i+2CrQS3VpIGyvh8zsxiWKLy/amQhFm0CUz1d2oFYlVuoPM1L5X6K7tnr+sfa9M7ZcWCYUVyScgDnPkpb1/6Q9OPamGtGkT2NKfZE4q2tR8/bgg31KaxSzDhJ6gXzFL0XaS8ejGxJz1zzkJDwQMD7j4GSqY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706073229; c=relaxed/simple; bh=hFskVw87Sdr8raPjNAxR5rfjJTmG9iVV6lVF91D6qJA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-type; b=m8KkL6Uc5UtoNX8PjFTZyFVtMtm0crJr+EsOuUJuQzTs7kp1wR9pbbtq4Me61cA2IRGMWsPZO3hFGz8SnRmFyNyIBiY4ij58S2+HXUcXt7Up9AuQ92VzAhOKN9q9SeQc/NzyN1dXl5pzTIshzAjksV/ANMyNxbTMPGhqzLZQDf0= 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=cmDB7FFl; arc=none smtp.client-ip=170.10.129.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=1706073226; 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=cmDB7FFlTDfyJ21q/mM4jIlxLB27dLRgVefWN1YZ1BebTtnO1Jp04x/MUHucku5rdjss1w vOjkYEkTewFl0W6Yajge2O+Qi1CvzqhwVW8eGT6u5FrdDWdJ8m8iyRf6c/G0o6z82JGqo4 I2nqOvooi7b8kcmSBaD7coB0uSio+WU= 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-101-ttLakTbNM3uB_a-svY1mPA-1; Wed, 24 Jan 2024 00:13:41 -0500 X-MC-Unique: ttLakTbNM3uB_a-svY1mPA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (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 A8E4738212D7; Wed, 24 Jan 2024 05:13:40 +0000 (UTC) Received: from MiWiFi-R3L-srv.redhat.com (unknown [10.72.116.117]) by smtp.corp.redhat.com (Postfix) with ESMTP id 18A5F1C060AF; Wed, 24 Jan 2024 05:13:34 +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 linux-next v3 05/14] crash: clean up kdump related config items Date: Wed, 24 Jan 2024 13:12:45 +0800 Message-ID: <20240124051254.67105-6-bhe@redhat.com> In-Reply-To: <20240124051254.67105-1-bhe@redhat.com> References: <20240124051254.67105-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.7 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