Message ID | 20240119145241.769622-11-bhe@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-31286-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2bc4:b0:101:a8e8:374 with SMTP id hx4csp1060555dyb; Fri, 19 Jan 2024 06:57:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IGQKKwKhfm42GXG9joqncnr2zmPFdgIwMEohe3mgP+aasFdXmZJXruxrcMS4/tCPfff7kGu X-Received: by 2002:a17:90a:e617:b0:290:14a6:2664 with SMTP id j23-20020a17090ae61700b0029014a62664mr2006733pjy.4.1705676248053; Fri, 19 Jan 2024 06:57:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705676248; cv=pass; d=google.com; s=arc-20160816; b=L1GEIy7XSLe7EdDO17e253W93V7UIpyW/lAvlUPO9hhx3UP7hZeziNbhUzGFyMgnWE ShLcJ59WyBkD2JkEGO4qzmO318rk+3Um1VuIAHbleF8OrFv4YB7T3nh7dsTz4gi9299P I2fMiuxmOFG2+3d/p6pukrdXngredtqxymioNdjBN2gHliMXAFD3DynmvWa8d6S5YNjC 50NIeCe/2SZKzGRx3Gxn2P4Cjj2FTsZnvd3jdzK37kSmyiQugGrqzp/FkGXfLsl8sTWe LEWWb0D1BlSj9G/l0w6i6g1UOLaeBdhiKkF/PpwItgz4EEyWi5hFkfyLryNEC6+FDJD0 /d2g== 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=o/8hCUVuTDtixWcZu0Bhjq+7RevB6bL41WaDVirnLF4=; fh=zRw2lYWZmEZ+xk8Dyhrd0rqHIpogjnUXaVblO2ikfrI=; b=PdjUJpxY3MGtd7w9GAOGRn3OxhYjqMxhj/aFebgnb6fre/LZut9aicuTUR3T/eTZ0d Y5Png1WcsSSoPZZ9ng3RSlI0jMYw/EgFT0GN+95Gpad/wGCRNHy6qC5oRFOiwqGCtyWQ 67eSvjYGsoYkQMcDA993Bfc3+PlhxY+6xatp7x1oDIXw0tFN3/22N2GOPMIoAeknTZcF mA3Ff2tWYTh57GyDuObq6R0/JkVSJ0DgwFaCr+jEiNOrIkNq+6/SjlmEmWG9aGmbSl1O AgLAzVVw8Qy6GBpW+UekHqNA2WmopKrjP7v/OhYm0IMhIZLHZw0Li7xoGihLTbQSumR+ CGxg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ZG8kYmV9; 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-31286-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31286-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id x5-20020a17090a8a8500b0028da227178dsi3388671pjn.76.2024.01.19.06.57.27 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 06:57:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-31286-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ZG8kYmV9; 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-31286-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31286-ouuuleilei=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id A0283B253A3 for <ouuuleilei@gmail.com>; Fri, 19 Jan 2024 14:55:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D0BA455E68; Fri, 19 Jan 2024 14:54:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ZG8kYmV9" 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 F012D5467D for <linux-kernel@vger.kernel.org>; Fri, 19 Jan 2024 14:54:15 +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=1705676057; cv=none; b=mBHNOV47mP2iQ+BdlQzZBrdE+7fHV66g0gz4EAnhZcNVTOZgx9Hl6Zl9Ddc+fvvcTsJXvtKQX3OiVUC9RiiTdQzEm7Z8APiCuNbioIZ1Zbj9iYogtW6zJ6Qv7ERc8A8Qffc/2aF1QBcAdJM2KLWpnw2iOYtUMZ40XZkrrfJk54s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705676057; c=relaxed/simple; bh=NVnBdGZA7tQM0SMzzy9C+0Stne+AfN1tEQ8W4aNz72Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-type; b=krRbiWDxb7rghnQNcf0DcNVYVbBhAsxEfWAd5j4o8b9nWx/j0y0AuDDYt4K7hlea/xluW6wN3+a22HlFDaH5Yup61Xv2WIAC9m911rKf++mFFAUIgrXuEtv/9G5KaFMTf9MHMWDq3l6QvtLsn3G5Ux306B52JhkzGH0B676+vYA= 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=ZG8kYmV9; 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=1705676055; 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=o/8hCUVuTDtixWcZu0Bhjq+7RevB6bL41WaDVirnLF4=; b=ZG8kYmV9c0UI3iU0shmY5yyfjFt1GuIkMm84RzfPmbIuhEkOmA6Pvu4dg1n6wBcZb5kdBq P99Sk80KookpmM0Uwc1XyFUVzzhcxnit9AUVVroVf3eSSKbHKarM9vKpcidD0TcCEljX+/ uVgIgnS24UnHsnv6uptvZwi5iRgp5L4= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-505-D60y9ktTMdCt2oSU5Zg3Og-1; Fri, 19 Jan 2024 09:54:10 -0500 X-MC-Unique: D60y9ktTMdCt2oSU5Zg3Og-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 46A7484FA82; Fri, 19 Jan 2024 14:54:09 +0000 (UTC) Received: from MiWiFi-R3L-srv.redhat.com (unknown [10.72.116.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4A02E51D5; Fri, 19 Jan 2024 14:54:02 +0000 (UTC) From: Baoquan He <bhe@redhat.com> 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 <bhe@redhat.com> Subject: [PATCH v2 10/14] sh, crash: wrap crash dumping code into crash related ifdefs Date: Fri, 19 Jan 2024 22:52:37 +0800 Message-ID: <20240119145241.769622-11-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: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-type: text/plain Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788531177395206936 X-GMAIL-MSGID: 1788531177395206936 |
Series |
Split crash out from kexec and clean up related config items
|
|
Commit Message
Baoquan He
Jan. 19, 2024, 2:52 p.m. UTC
Now crash codes under kernel/ folder has been split out from kexec
code, crash dumping can be separated from kexec reboot in config
items on SuperH with some adjustments.
Here wrap up crashkernel reservation code inside CONFIG_CRASH_RESERVE
ifdeffery scope.
Signed-off-by: Baoquan He <bhe@redhat.com>
---
arch/sh/kernel/machine_kexec.c | 3 +++
arch/sh/kernel/setup.c | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/sh/kernel/machine_kexec.c b/arch/sh/kernel/machine_kexec.c index fa3a7b36190a..8daa8a6e6fa6 100644 --- a/arch/sh/kernel/machine_kexec.c +++ b/arch/sh/kernel/machine_kexec.c @@ -153,6 +153,9 @@ void __init reserve_crashkernel(void) unsigned long long crash_size, crash_base; int ret; + if (!IS_ENABLED(CONFIG_CRASH_RESERVE)) + return; + ret = parse_crashkernel(boot_command_line, memblock_phys_mem_size(), &crash_size, &crash_base, NULL, NULL); if (ret == 0 && crash_size > 0) { diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index d3175f09b3aa..620e5cf8ae1e 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c @@ -220,7 +220,7 @@ void __init __add_active_range(unsigned int nid, unsigned long start_pfn, request_resource(res, &code_resource); request_resource(res, &data_resource); request_resource(res, &bss_resource); -#ifdef CONFIG_KEXEC_CORE +#ifdef CONFIG_CRASH_RESERVE request_resource(res, &crashk_res); #endif