Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2172836rdb; Thu, 7 Dec 2023 23:31:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IEGFaJ5MySJ5mhHFgKAy2Ve+yPsXSDBS9DNMDDr61bmxLndsGy2mpNXIB/sZ8exvk0B4mTm X-Received: by 2002:a17:903:230d:b0:1d0:c28e:2f2 with SMTP id d13-20020a170903230d00b001d0c28e02f2mr3411332plh.73.1702020707401; Thu, 07 Dec 2023 23:31:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702020707; cv=none; d=google.com; s=arc-20160816; b=HXY7aSQFFrLkeq9KR/OfVKKlDoSa00jAfgehnzs/QrOcBZJNXV08J85D71mbV919WA AjoQDEyGFmIPgMmOmKcyRos2E9g7W0LA2o0pEt3g9fs+9fVb/o68Skthl2/g5TufLkwy IPjkadBQ7/xjcsPLLUnL/rqSO1mquUOfFWITBem6Yucagd3IWuNQwn2b5qtnnDHF4+XT mbwwWbTAmgh0LJsA2wRFzdTaKaCLWj+u4S2Wk+omSdf6og336gA7V0Jl7Pd8jre8YgQz azJedPPNh5jMMN4o8fPWsSJGNXNlyA127mCNZuWFiE96H8Dk51XbSqYu1beUGQp8H+Jk U1yQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=+lB8OPeQJjgaWARqsUn13We4+TMzElto8Rr7ZVVZCOI=; fh=habjxf0YG4WcSNEaenG3Vo3U89MQlBfQp/ZbK3+3bDw=; b=BH9F5i5UCN4a45DqMRTTK2OPuWiwsJ13ZIiYxGjnltHGK4R9wvVu+q/sBNZoNtIeK4 ozpI7S4d16AmR93vZ2UNGPfUcqwApp26HuTh/N3BUf7t0YjToV0Tg5nFrZVxpSVa37n5 yUzhTwDqHIvITppC+PFaMr6hVB/fOUfLPAnUSu+zhjT1KTqCrmlw6I/AKN2iGGsAveuQ y1BkmJqoITCxzyNG2AutO2xHrTuiYOpt1vGwts28Bpv5NY84hwaCdpa9Ea2x3qYRAxAD +oxQ6NWHejq2OrgECkW2oOv5RSM7CuaiMaqj9jvK2mlF6XLrjwf4P1OkCZGgkVMUNJbw OTAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ct8tB0rf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id t8-20020a1709028c8800b001cf97206e86si1129369plo.75.2023.12.07.23.31.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 23:31:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ct8tB0rf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id C3C6E823D9FC; Thu, 7 Dec 2023 23:31:42 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1573242AbjLHHbU (ORCPT + 99 others); Fri, 8 Dec 2023 02:31:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1573291AbjLHHbN (ORCPT ); Fri, 8 Dec 2023 02:31:13 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 612A91998 for ; Thu, 7 Dec 2023 23:31:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702020670; 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=+lB8OPeQJjgaWARqsUn13We4+TMzElto8Rr7ZVVZCOI=; b=ct8tB0rfx2AvLe2iGS4vnedRUp0qzWR5Nk2HoPR16YbrPboUsk3q1BMmR2cCZcd2Y81WgP 2rn+zpqD70aKwG15PUbj7iQPES+bL+ay1S2eFoF/lPPYP+2Spcy5GO8Gd6Cxt1gL7vXBBO Px4eRs91TUJccgeBAE5zEfCJ6zF5NJM= 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-362--JrlYu-NMbW6mrd71_ScUw-1; Fri, 08 Dec 2023 02:31:05 -0500 X-MC-Unique: -JrlYu-NMbW6mrd71_ScUw-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 93A4A831004; Fri, 8 Dec 2023 07:31:04 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.72.112.9]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4D43C8CD1; Fri, 8 Dec 2023 07:31:00 +0000 (UTC) From: Baoquan He To: linux-kernel@vger.kernel.org Cc: linux-next@vger.kernel.org, loongarch@lists.linux.dev, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-sh@vger.kernel.org, x86@kernel.org, akpm@linux-foundation.org, eric_devolder@yahoo.com, sfr@canb.auug.org.au, ignat@cloudflare.com, Baoquan He Subject: [PATCH 4/5] sh, kexec: fix the incorrect ifdeffery and dependency of CONFIG_KEXEC Date: Fri, 8 Dec 2023 15:30:35 +0800 Message-ID: <20231208073036.7884-5-bhe@redhat.com> In-Reply-To: <20231208073036.7884-1-bhe@redhat.com> References: <20231208073036.7884-1-bhe@redhat.com> 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-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Thu, 07 Dec 2023 23:31:43 -0800 (PST) The select of KEXEC for CRASH_DUMP in kernel/Kconfig.kexec will be dropped, then compiling errors will be triggered if below config items are set: === CONFIG_CRASH_CORE=y CONFIG_KEXEC_CORE=y CONFIG_CRASH_DUMP=y === Here, change the dependency of building kexec_core related object files, and the ifdeffery on SuperH from CONFIG_KEXEC to CONFIG_KEXEC_CORE. Signed-off-by: Baoquan He --- arch/sh/include/asm/kexec.h | 4 ++-- arch/sh/kernel/Makefile | 2 +- arch/sh/kernel/reboot.c | 4 ++-- arch/sh/kernel/setup.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/sh/include/asm/kexec.h b/arch/sh/include/asm/kexec.h index 927d80ba2332..76631714673c 100644 --- a/arch/sh/include/asm/kexec.h +++ b/arch/sh/include/asm/kexec.h @@ -28,7 +28,7 @@ /* The native architecture */ #define KEXEC_ARCH KEXEC_ARCH_SH -#ifdef CONFIG_KEXEC +#ifdef CONFIG_KEXEC_CORE /* arch/sh/kernel/machine_kexec.c */ void reserve_crashkernel(void); @@ -67,6 +67,6 @@ static inline void crash_setup_regs(struct pt_regs *newregs, } #else static inline void reserve_crashkernel(void) { } -#endif /* CONFIG_KEXEC */ +#endif /* CONFIG_KEXEC_CORE */ #endif /* __ASM_SH_KEXEC_H */ diff --git a/arch/sh/kernel/Makefile b/arch/sh/kernel/Makefile index 69cd9ac4b2ab..2d7e70537de0 100644 --- a/arch/sh/kernel/Makefile +++ b/arch/sh/kernel/Makefile @@ -33,7 +33,7 @@ obj-$(CONFIG_SMP) += smp.o obj-$(CONFIG_SH_STANDARD_BIOS) += sh_bios.o obj-$(CONFIG_KGDB) += kgdb.o obj-$(CONFIG_MODULES) += sh_ksyms_32.o module.o -obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o +obj-$(CONFIG_KEXEC_CORE) += machine_kexec.o relocate_kernel.o obj-$(CONFIG_CRASH_DUMP) += crash_dump.o obj-$(CONFIG_STACKTRACE) += stacktrace.o obj-$(CONFIG_IO_TRAPPED) += io_trapped.o diff --git a/arch/sh/kernel/reboot.c b/arch/sh/kernel/reboot.c index e8eeedc9b182..1de006b1c339 100644 --- a/arch/sh/kernel/reboot.c +++ b/arch/sh/kernel/reboot.c @@ -63,7 +63,7 @@ struct machine_ops machine_ops = { .shutdown = native_machine_shutdown, .restart = native_machine_restart, .halt = native_machine_halt, -#ifdef CONFIG_KEXEC +#ifdef CONFIG_KEXEC_CORE .crash_shutdown = native_machine_crash_shutdown, #endif }; @@ -88,7 +88,7 @@ void machine_halt(void) machine_ops.halt(); } -#ifdef CONFIG_KEXEC +#ifdef CONFIG_KEXEC_CORE void machine_crash_shutdown(struct pt_regs *regs) { machine_ops.crash_shutdown(regs); diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index 3d80515298d2..d3175f09b3aa 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 +#ifdef CONFIG_KEXEC_CORE request_resource(res, &crashk_res); #endif -- 2.41.0