From patchwork Fri Dec 8 07:30:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoquan He X-Patchwork-Id: 175646 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp5296351vqy; Thu, 7 Dec 2023 23:31:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IFhKxk+ygEGfO2cIvDO7maeuCXpsx492noNpvCrru2BtHCDyI+crG3YlsD4CKJFrGIRLHXp X-Received: by 2002:a17:90a:1988:b0:286:6cc0:885c with SMTP id 8-20020a17090a198800b002866cc0885cmr2941964pji.73.1702020665992; Thu, 07 Dec 2023 23:31:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702020665; cv=none; d=google.com; s=arc-20160816; b=arUn7waBaUxjN6IsxdGiIaCg1pMQnWMA8+xEP2ZhViBmSWL2dghOs4xkfqSubzSMH3 tiujLaL6VXjIHNuGnfw5qsqIeghCR7jiXUmD2ngWwwweWY4b6et4yFC1+jVRfRPXgTPS bOOqN3LKS5dodY7I1q+l0Fs1gDr9OEYpFgd1Ox+qUJj5NnIkQj0t+g8NE5Bly/hanjQe uygqZgHDO0HzGiUG96Syr1ywsaeBIN+90qHnhgyGieDgp/ZZE24NFXIdx1cIcGi7AW50 5mK6u960eoQre9z6mURBSW3KjCMv+3NPBDwxkYXTj1nTMHFDVNRZOOk8rpPYNqencyba 53aw== 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=PMJ0khluh69+oGYQ45qNovXMn1kcyTft2Ss07SyrAMA=; fh=NXLCNOpVSWrCPkQH9LuPbfBF5AbR2buWGYxPwgKw26A=; b=bLVyM2Au4QHIi7IbKaWafk7kH7O+JPcMaWxfqPINIdlyrCiVMn+LJgc/NczgX7ssjf 88cbg9ZWQh46O6tO3Ycxo3o8aKc+OnSZq7rPF1VWGuyJxlB6OD/F0YZNh6WgsvhyQwqo 2cNxF36PcnjbwLqXLAKd5yzNzo7abUvF3AiL5DnjzjdzOn3g1Amed3qjM5diWW2YhJey LhLYF5HkL/m7FjioyvhaPCGTNXtjnWizGdm9ABW3mZvRgx+Z3BT2FlVAVxUr9xm9moEO NTvLOLs0NS3YYNfFHwmezMDiVyIiCY0A2QhQwPowEOeXwYKUT5jkIh+lMoCAHwVwj1lF Sm1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OeooZJQF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id pt3-20020a17090b3d0300b0028656396773si1257778pjb.109.2023.12.07.23.31.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 23:31:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OeooZJQF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id EA1E98705E9B; Thu, 7 Dec 2023 23:31:02 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1573264AbjLHHay (ORCPT + 99 others); Fri, 8 Dec 2023 02:30:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235765AbjLHHav (ORCPT ); Fri, 8 Dec 2023 02:30:51 -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 A6CC31733 for ; Thu, 7 Dec 2023 23:30:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702020656; 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=PMJ0khluh69+oGYQ45qNovXMn1kcyTft2Ss07SyrAMA=; b=OeooZJQFxMz5qZ7k8kW4ot6lZeF3nalCVzOvzdvbkGUTAo5ZQfw6DJY8UjlH3Q0rf77BBL kC/hCePL/GW5ujzzdo3l6oDnlqYAGx85Ock1fKrLw+MguDLu3+o/szU3qMeFYU9x46LRas Q+QtQmyzpbhLBjox74qFDMLT4RVPUe8= 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-310-fgcVBsYqNd-Y6txwm1BDyQ-1; Fri, 08 Dec 2023 02:30:51 -0500 X-MC-Unique: fgcVBsYqNd-Y6txwm1BDyQ-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 939181C05ED0; Fri, 8 Dec 2023 07:30:49 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.72.112.9]) by smtp.corp.redhat.com (Postfix) with ESMTP id D7C5A8CD0; Fri, 8 Dec 2023 07:30:44 +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 , kernel test robot Subject: [PATCH 1/5] loongarch, kexec: change dependency of object files Date: Fri, 8 Dec 2023 15:30:32 +0800 Message-ID: <20231208073036.7884-2-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 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 howler.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 (howler.vger.email [0.0.0.0]); Thu, 07 Dec 2023 23:31:03 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784698021734069101 X-GMAIL-MSGID: 1784698021734069101 Currently, in arch/loongarch/kernel/Makefile, building machine_kexec.o relocate_kernel.o depends on CONFIG_KEXEC. Whereas, since we will drop the select of KEXEC for CRASH_DUMP in kernel/Kconfig.kexec, compiling error will be triggered if below config items are set: === CONFIG_CRASH_CORE=y CONFIG_KEXEC_CORE=y CONFIG_CRASH_DUMP=y === --------------------------------------------------------------- loongarch64-linux-ld: kernel/kexec_core.o: in function `.L209': >> kexec_core.c:(.text+0x1660): undefined reference to `machine_kexec_cleanup' loongarch64-linux-ld: kernel/kexec_core.o: in function `.L287': >> kexec_core.c:(.text+0x1c5c): undefined reference to `machine_crash_shutdown' >> loongarch64-linux-ld: kexec_core.c:(.text+0x1c64): undefined reference to `machine_kexec' loongarch64-linux-ld: kernel/kexec_core.o: in function `.L2^B5': >> kexec_core.c:(.text+0x2090): undefined reference to `machine_shutdown' loongarch64-linux-ld: kexec_core.c:(.text+0x20a0): undefined reference to `machine_kexec' --------------------------------------------------------------- Here, changing the dependency of machine_kexec.o relocate_kernel.o to CONFIG_KEXEC_CORE can fix above building error. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202311300946.kHE9Iu71-lkp@intel.com/ Signed-off-by: Baoquan He --- arch/loongarch/kernel/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/loongarch/kernel/Makefile b/arch/loongarch/kernel/Makefile index 4fcc168f0732..3c808c680370 100644 --- a/arch/loongarch/kernel/Makefile +++ b/arch/loongarch/kernel/Makefile @@ -57,7 +57,7 @@ obj-$(CONFIG_MAGIC_SYSRQ) += sysrq.o obj-$(CONFIG_RELOCATABLE) += relocate.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_UNWINDER_GUESS) += unwind_guess.o From patchwork Fri Dec 8 07:30:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoquan He X-Patchwork-Id: 175651 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp5296820vqy; Thu, 7 Dec 2023 23:32:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IEQtnc7DAvLLJKdNWZh+f5HpztJ7GLVztS6YqAK7YS5yV3crYvWsjcDbMGRXnaHauFPx74O X-Received: by 2002:a05:6358:90d:b0:16d:a668:bca9 with SMTP id r13-20020a056358090d00b0016da668bca9mr4861243rwi.11.1702020735325; Thu, 07 Dec 2023 23:32:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702020735; cv=none; d=google.com; s=arc-20160816; b=Aff4N4N/DexjSSl15+VSBx6wU6I74Y1mUjxl6ToV6B8c/E2UMFftgbCPqIF5h1bd/9 y6V3gvwA6jNxPY17gVDVuOYzLoLO/o0YU1SO7DbuL9RNXH3b3YoQDj3ols2qxeEzV7UB SCkioUeFRSGT6wXgQAXsZtA0d98pLL9MGZDcmyUTJvkEq07OgOG+BAnbYPvrcXo71Si/ LhtQw/YD4nzzA5B6OZMraudqfuHtno9Ejb/xfmtUZ0i+BuIu5qreIxJmxxANZWXsGWiU dVX9q/TvnCyufanEybawvic8fKckaKFaV8ktIFcr5b9q03wxmXlAxINyiNbW00cjANOn rrfg== 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=AFTgp6lfPOaLMwFRk/b9GnoxoPZWuc7zSIjL2Vb3cuA=; fh=habjxf0YG4WcSNEaenG3Vo3U89MQlBfQp/ZbK3+3bDw=; b=iN3fyTW0NRarQAwsrXPWDzWGJxmInHwkIh6uhAd9oabyS9Zsit7T98rA0vGINh3nar vh3xK+3a5qyh0O999esscNd46ZoiNKIJ/XaqME75hjoqU4ZoPcFpe2Ba2aeaY3Fe+7yQ hZ/5Cvy8+s0iwhRhikpjUMw3sORrO62iu82K1zva9htr5AtFKoPPLqtSn0hSWEKvd0nm YOPdPFh2/7MHEw8qtHjb8xRoRxJdcAooaXSXQO8go4WRz2UILDKIqD9QC1Nm5pbx65gp pDBpbAIKJeLBwnmWTr3bw/cGKKSIcqynJW4xRqFZWB1XeVVdeYq1zuD9XmgkxUfDv1EV U39Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=e1p9J7Og; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id 36-20020a631564000000b005c625af78acsi1063444pgv.881.2023.12.07.23.32.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 23:32:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=e1p9J7Og; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (Postfix) with ESMTP id 9867380A1343; Thu, 7 Dec 2023 23:31:08 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233174AbjLHHa5 (ORCPT + 99 others); Fri, 8 Dec 2023 02:30:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1573263AbjLHHay (ORCPT ); Fri, 8 Dec 2023 02:30:54 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BCC41730 for ; Thu, 7 Dec 2023 23:31:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702020659; 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=AFTgp6lfPOaLMwFRk/b9GnoxoPZWuc7zSIjL2Vb3cuA=; b=e1p9J7OgDE5F6cY0FgxBTI+jYGhHSeBIHVGfXUBIPlANXOahFjtF3AHkwbFyUelHfez1N8 U2aQzPAfD/0vP4ry/a5vjfhBoZFasDAQh00it1u55nnPw5pzRZG1rjTNe4lftUOCdfzYB2 NP6V1rjiUUx0DC6g3YZB5qk/l+hVFEI= 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-643-btMzKor2McqU7VqUp2Z8dg-1; Fri, 08 Dec 2023 02:30:55 -0500 X-MC-Unique: btMzKor2McqU7VqUp2Z8dg-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 7CCB4868902; Fri, 8 Dec 2023 07:30:54 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.72.112.9]) by smtp.corp.redhat.com (Postfix) with ESMTP id 33E808CD0; Fri, 8 Dec 2023 07:30:49 +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 2/5] m68k, kexec: fix the incorrect ifdeffery and build dependency of CONFIG_KEXEC Date: Fri, 8 Dec 2023 15:30:33 +0800 Message-ID: <20231208073036.7884-3-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 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 morse.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 (morse.vger.email [0.0.0.0]); Thu, 07 Dec 2023 23:31:08 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784698094371849641 X-GMAIL-MSGID: 1784698094371849641 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 buinding machine_kexec.o relocate_kernel.o and the ifdeffery in asm/kexe.h to CONFIG_KEXEC_CORE. Signed-off-by: Baoquan He --- arch/m68k/include/asm/kexec.h | 4 ++-- arch/m68k/kernel/Makefile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/m68k/include/asm/kexec.h b/arch/m68k/include/asm/kexec.h index f5a8b2defa4b..3b0b64f0a353 100644 --- a/arch/m68k/include/asm/kexec.h +++ b/arch/m68k/include/asm/kexec.h @@ -2,7 +2,7 @@ #ifndef _ASM_M68K_KEXEC_H #define _ASM_M68K_KEXEC_H -#ifdef CONFIG_KEXEC +#ifdef CONFIG_KEXEC_CORE /* Maximum physical address we can use pages from */ #define KEXEC_SOURCE_MEMORY_LIMIT (-1UL) @@ -25,6 +25,6 @@ static inline void crash_setup_regs(struct pt_regs *newregs, #endif /* __ASSEMBLY__ */ -#endif /* CONFIG_KEXEC */ +#endif /* CONFIG_KEXEC_CORE */ #endif /* _ASM_M68K_KEXEC_H */ diff --git a/arch/m68k/kernel/Makefile b/arch/m68k/kernel/Makefile index 01fb69a5095f..f335bf3268a1 100644 --- a/arch/m68k/kernel/Makefile +++ b/arch/m68k/kernel/Makefile @@ -25,7 +25,7 @@ obj-$(CONFIG_PCI) += pcibios.o obj-$(CONFIG_M68K_NONCOHERENT_DMA) += dma.o -obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o +obj-$(CONFIG_KEXEC_CORE) += machine_kexec.o relocate_kernel.o obj-$(CONFIG_BOOTINFO_PROC) += bootinfo_proc.o obj-$(CONFIG_UBOOT) += uboot.o From patchwork Fri Dec 8 07:30:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoquan He X-Patchwork-Id: 175647 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp5296529vqy; Thu, 7 Dec 2023 23:31:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IFx+mxPB1cgxFsoEeUenQCCS/POL5hwmP3rjnz+4wSEpv3tcDoMKFl+oOqL26pWABY0c/bW X-Received: by 2002:a05:6a20:daa9:b0:187:78ef:e3f1 with SMTP id iy41-20020a056a20daa900b0018778efe3f1mr5041702pzb.20.1702020692216; Thu, 07 Dec 2023 23:31:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702020692; cv=none; d=google.com; s=arc-20160816; b=y7l9AjuQG4AA+cGEe6C6kXCxRmpM9GJedr2kc2SMLJ1Xz7lr6WIISY3O78Zhr0Ef02 8SO6LOKm00hvHhG2mL45gMXuup9EGN1Vn3CE40zpFAs+CqXkMxFlyuuayL+qqPNcuHjS n4QP2k5u65dRwlIRTBog621W0OAS7PM+jq12muhottWb3R7cfIiGYgPGg2l8OzRiFuDz khd1Xo7sTDuAJ3ESYgq2I6H7f9i9loBZRAcnPfJNCGY8mQh3ypuio6/mA3bVK8K9Tvv+ oZDsiD4KVoviSZQKkDFZeFbYQQoaz/EcMHoMvgo85SmFnwfyLMe7Tb9BbVUFKUaeal3C gX9w== 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=fTgJq0WDYWry7hy4y8Pbn9hjTuGpWfcbIu67sKiiHlw=; fh=NXLCNOpVSWrCPkQH9LuPbfBF5AbR2buWGYxPwgKw26A=; b=uGJ8XnSKwPQQk22MZeBLqVpQLpjnKHeTTQD4ZgtY1jVuM1D/+6mHi7+X0DsSZQqjIt zPjj46AP/kgHh1rRrbLmVScBULOJV+wzLp88OmppBxI9Z7V55zvtwhN4DKj6gGWlw48V 7rtO8tlJq0h8lQOniHokG//Q5AoBRhmUxdGmAjIZY83WRY8ic9o2uG9vyEOpMMmq/wOI qlYnnS1mKPibcTKbRxkY8VukuXNskLa71X8+PEuY7q/oLRCNW00hIMVzJWwy7Cj2LTdJ b+G2aUrtSFHguB0i23MYXoDEUTAMFcx3A3RVWCqCdUdkIgb4uxwz8vEPe12YGFEzCoFB DXyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HQLQXuZv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id c17-20020a631c51000000b005c657587706si1112404pgm.228.2023.12.07.23.31.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 23:31:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HQLQXuZv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (Postfix) with ESMTP id BF4878106F73; Thu, 7 Dec 2023 23:31:26 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1573303AbjLHHbP (ORCPT + 99 others); Fri, 8 Dec 2023 02:31:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1573242AbjLHHbB (ORCPT ); Fri, 8 Dec 2023 02:31:01 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EAD43172E for ; Thu, 7 Dec 2023 23:31:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702020664; 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=fTgJq0WDYWry7hy4y8Pbn9hjTuGpWfcbIu67sKiiHlw=; b=HQLQXuZvuUhkF8mJtP+F/cbhEmtYjr66RBEiZgmfLdWIuF4QCDgfMdIXGzX7fAEK1urVjo N4pjj20MG5gC0CUsnQ48yYuiaXZKJkGNvQ6WUAAgRLLFR0ggP453h9DKVPB3XjbPIeBptM PjEkonomPwIC1RvQAQL+XgApXZ76l5g= 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-241-1A-qT-_-OQ2MXlptes4paQ-1; Fri, 08 Dec 2023 02:31:00 -0500 X-MC-Unique: 1A-qT-_-OQ2MXlptes4paQ-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 AE30A38062AB; Fri, 8 Dec 2023 07:30:59 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.72.112.9]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1BE108CD0; Fri, 8 Dec 2023 07:30:54 +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 , kernel test robot Subject: [PATCH 3/5] mips, kexec: fix the incorrect ifdeffery and dependency of CONFIG_KEXEC Date: Fri, 8 Dec 2023 15:30:34 +0800 Message-ID: <20231208073036.7884-4-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 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 fry.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 (fry.vger.email [0.0.0.0]); Thu, 07 Dec 2023 23:31:27 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784698049445196235 X-GMAIL-MSGID: 1784698049445196235 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 === -------------------------------------------------------------------- mipsel-linux-ld: kernel/kexec_core.o: in function `kimage_free': kernel/kexec_core.c:(.text+0x2200): undefined reference to `machine_kexec_cleanup' mipsel-linux-ld: kernel/kexec_core.o: in function `__crash_kexec': kernel/kexec_core.c:(.text+0x2480): undefined reference to `machine_crash_shutdown' mipsel-linux-ld: kernel/kexec_core.c:(.text+0x2488): undefined reference to `machine_kexec' mipsel-linux-ld: kernel/kexec_core.o: in function `kernel_kexec': kernel/kexec_core.c:(.text+0x29b8): undefined reference to `machine_shutdown' mipsel-linux-ld: kernel/kexec_core.c:(.text+0x29c0): undefined reference to `machine_kexec' -------------------------------------------------------------------- Here, change the dependency of building kexec_core related object files, and the ifdeffery in mips from CONFIG_KEXEC to CONFIG_KEXEC_CORE. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202311302042.sn8cDPIX-lkp@intel.com/ Signed-off-by: Baoquan He --- arch/mips/cavium-octeon/smp.c | 4 ++-- arch/mips/include/asm/kexec.h | 2 +- arch/mips/include/asm/smp-ops.h | 2 +- arch/mips/include/asm/smp.h | 2 +- arch/mips/kernel/Makefile | 2 +- arch/mips/kernel/smp-bmips.c | 4 ++-- arch/mips/kernel/smp-cps.c | 10 +++++----- arch/mips/loongson64/reset.c | 4 ++-- arch/mips/loongson64/smp.c | 2 +- 9 files changed, 16 insertions(+), 16 deletions(-) diff --git a/arch/mips/cavium-octeon/smp.c b/arch/mips/cavium-octeon/smp.c index 33c09688210f..08ea2cde1eb5 100644 --- a/arch/mips/cavium-octeon/smp.c +++ b/arch/mips/cavium-octeon/smp.c @@ -422,7 +422,7 @@ static const struct plat_smp_ops octeon_smp_ops = { .cpu_disable = octeon_cpu_disable, .cpu_die = octeon_cpu_die, #endif -#ifdef CONFIG_KEXEC +#ifdef CONFIG_KEXEC_CORE .kexec_nonboot_cpu = kexec_nonboot_cpu_jump, #endif }; @@ -502,7 +502,7 @@ static const struct plat_smp_ops octeon_78xx_smp_ops = { .cpu_disable = octeon_cpu_disable, .cpu_die = octeon_cpu_die, #endif -#ifdef CONFIG_KEXEC +#ifdef CONFIG_KEXEC_CORE .kexec_nonboot_cpu = kexec_nonboot_cpu_jump, #endif }; diff --git a/arch/mips/include/asm/kexec.h b/arch/mips/include/asm/kexec.h index d6d5fa5cc31d..69e579e41e66 100644 --- a/arch/mips/include/asm/kexec.h +++ b/arch/mips/include/asm/kexec.h @@ -31,7 +31,7 @@ static inline void crash_setup_regs(struct pt_regs *newregs, prepare_frametrace(newregs); } -#ifdef CONFIG_KEXEC +#ifdef CONFIG_KEXEC_CORE struct kimage; extern unsigned long kexec_args[4]; extern int (*_machine_kexec_prepare)(struct kimage *); diff --git a/arch/mips/include/asm/smp-ops.h b/arch/mips/include/asm/smp-ops.h index 5719ff49eff1..0c59e168f800 100644 --- a/arch/mips/include/asm/smp-ops.h +++ b/arch/mips/include/asm/smp-ops.h @@ -35,7 +35,7 @@ struct plat_smp_ops { void (*cpu_die)(unsigned int cpu); void (*cleanup_dead_cpu)(unsigned cpu); #endif -#ifdef CONFIG_KEXEC +#ifdef CONFIG_KEXEC_CORE void (*kexec_nonboot_cpu)(void); #endif }; diff --git a/arch/mips/include/asm/smp.h b/arch/mips/include/asm/smp.h index a40d8c0e4b87..901bc61fa7ae 100644 --- a/arch/mips/include/asm/smp.h +++ b/arch/mips/include/asm/smp.h @@ -93,7 +93,7 @@ static inline void __cpu_die(unsigned int cpu) extern void __noreturn play_dead(void); #endif -#ifdef CONFIG_KEXEC +#ifdef CONFIG_KEXEC_CORE static inline void kexec_nonboot_cpu(void) { extern const struct plat_smp_ops *mp_ops; /* private */ diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile index 853a43ee4b44..ecf3278a32f7 100644 --- a/arch/mips/kernel/Makefile +++ b/arch/mips/kernel/Makefile @@ -90,7 +90,7 @@ obj-$(CONFIG_GPIO_TXX9) += gpio_txx9.o obj-$(CONFIG_RELOCATABLE) += relocate.o -obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o crash.o +obj-$(CONFIG_KEXEC_CORE) += machine_kexec.o relocate_kernel.o crash.o obj-$(CONFIG_CRASH_DUMP) += crash_dump.o obj-$(CONFIG_EARLY_PRINTK) += early_printk.o obj-$(CONFIG_EARLY_PRINTK_8250) += early_printk_8250.o diff --git a/arch/mips/kernel/smp-bmips.c b/arch/mips/kernel/smp-bmips.c index c074ecce3fbf..b3dbf9ecb0d6 100644 --- a/arch/mips/kernel/smp-bmips.c +++ b/arch/mips/kernel/smp-bmips.c @@ -434,7 +434,7 @@ const struct plat_smp_ops bmips43xx_smp_ops = { .cpu_disable = bmips_cpu_disable, .cpu_die = bmips_cpu_die, #endif -#ifdef CONFIG_KEXEC +#ifdef CONFIG_KEXEC_CORE .kexec_nonboot_cpu = kexec_nonboot_cpu_jump, #endif }; @@ -451,7 +451,7 @@ const struct plat_smp_ops bmips5000_smp_ops = { .cpu_disable = bmips_cpu_disable, .cpu_die = bmips_cpu_die, #endif -#ifdef CONFIG_KEXEC +#ifdef CONFIG_KEXEC_CORE .kexec_nonboot_cpu = kexec_nonboot_cpu_jump, #endif }; diff --git a/arch/mips/kernel/smp-cps.c b/arch/mips/kernel/smp-cps.c index dd55d59b88db..f6c37d407f36 100644 --- a/arch/mips/kernel/smp-cps.c +++ b/arch/mips/kernel/smp-cps.c @@ -392,7 +392,7 @@ static void cps_smp_finish(void) local_irq_enable(); } -#if defined(CONFIG_HOTPLUG_CPU) || defined(CONFIG_KEXEC) +#if defined(CONFIG_HOTPLUG_CPU) || defined(CONFIG_KEXEC_CORE) enum cpu_death { CPU_DEATH_HALT, @@ -429,7 +429,7 @@ static void cps_shutdown_this_cpu(enum cpu_death death) } } -#ifdef CONFIG_KEXEC +#ifdef CONFIG_KEXEC_CORE static void cps_kexec_nonboot_cpu(void) { @@ -439,9 +439,9 @@ static void cps_kexec_nonboot_cpu(void) cps_shutdown_this_cpu(CPU_DEATH_POWER); } -#endif /* CONFIG_KEXEC */ +#endif /* CONFIG_KEXEC_CORE */ -#endif /* CONFIG_HOTPLUG_CPU || CONFIG_KEXEC */ +#endif /* CONFIG_HOTPLUG_CPU || CONFIG_KEXEC_CORE */ #ifdef CONFIG_HOTPLUG_CPU @@ -610,7 +610,7 @@ static const struct plat_smp_ops cps_smp_ops = { .cpu_die = cps_cpu_die, .cleanup_dead_cpu = cps_cleanup_dead_cpu, #endif -#ifdef CONFIG_KEXEC +#ifdef CONFIG_KEXEC_CORE .kexec_nonboot_cpu = cps_kexec_nonboot_cpu, #endif }; diff --git a/arch/mips/loongson64/reset.c b/arch/mips/loongson64/reset.c index e420800043b0..e01c8d4a805a 100644 --- a/arch/mips/loongson64/reset.c +++ b/arch/mips/loongson64/reset.c @@ -53,7 +53,7 @@ static void loongson_halt(void) } } -#ifdef CONFIG_KEXEC +#ifdef CONFIG_KEXEC_CORE /* 0X80000000~0X80200000 is safe */ #define MAX_ARGS 64 @@ -158,7 +158,7 @@ static int __init mips_reboot_setup(void) _machine_halt = loongson_halt; pm_power_off = loongson_poweroff; -#ifdef CONFIG_KEXEC +#ifdef CONFIG_KEXEC_CORE kexec_argv = kmalloc(KEXEC_ARGV_SIZE, GFP_KERNEL); if (WARN_ON(!kexec_argv)) return -ENOMEM; diff --git a/arch/mips/loongson64/smp.c b/arch/mips/loongson64/smp.c index e015a26a40f7..498bdc1bb0ed 100644 --- a/arch/mips/loongson64/smp.c +++ b/arch/mips/loongson64/smp.c @@ -864,7 +864,7 @@ const struct plat_smp_ops loongson3_smp_ops = { .cpu_disable = loongson3_cpu_disable, .cpu_die = loongson3_cpu_die, #endif -#ifdef CONFIG_KEXEC +#ifdef CONFIG_KEXEC_CORE .kexec_nonboot_cpu = kexec_nonboot_cpu_jump, #endif }; From patchwork Fri Dec 8 07:30:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoquan He X-Patchwork-Id: 175648 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp5296583vqy; Thu, 7 Dec 2023 23:31:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IFevogM2GRyhSML/pcZyz48LPTX5FevEQAVp+F508z9rojTl5r8I2qnwNCA7edmShEj+Z2t X-Received: by 2002:a05:6a20:1605:b0:18f:97c:8251 with SMTP id l5-20020a056a20160500b0018f097c8251mr4097462pzj.91.1702020701487; Thu, 07 Dec 2023 23:31:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702020701; cv=none; d=google.com; s=arc-20160816; b=p7c5ghJ7dNO6D+5N+XTJvixDLTDpKeR+pLMs23VK7gFnoH4RrCiWVCF+qVTXzM9bv6 VIN/VTqpm3WqNAeZ5YK48n0tOH6Ex2c8LULMCVpxbgWKjYprT7Hjo8pZq0sqPd3kjO25 HHBWYUsk5i+Q5TPuhmA/lwAme20zRi98J9knlsLCB1js4X2higCZhDNs7/emGxe1NVNB Qlp8OWU+wpHNVjO2EXrcIgFyz+slrzNgnLbeYDZYGv3J2MU8Wr9mwZ8uI5vp9jdd4w7A xwE62oVzgCLQZCGgrVHHh+bPb4TrwItN6vzy59aQkOmnaOlmbk2OjWOWCsGkHd8Fa0Z3 o+rg== 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 2620:137:e000::3:6 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 pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id k80-20020a628453000000b006ce76562916si1089828pfd.377.2023.12.07.23.31.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 23:31:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; 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 2620:137:e000::3:6 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 5E62C823D9F4; Thu, 7 Dec 2023 23:31:38 -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 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:38 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784698059261222708 X-GMAIL-MSGID: 1784698059261222708 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 From patchwork Fri Dec 8 07:30:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoquan He X-Patchwork-Id: 175649 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp5296618vqy; Thu, 7 Dec 2023 23:31:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IFL1jy6sAX8BvdRSNfEeKcEJbmxSe8NqtXQkucIcr/W3C2lhGY+BEC1pBtW+517F+ukEobG X-Received: by 2002:a17:90b:3ecb:b0:283:2c19:c9bb with SMTP id rm11-20020a17090b3ecb00b002832c19c9bbmr3646775pjb.13.1702020705530; Thu, 07 Dec 2023 23:31:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702020705; cv=none; d=google.com; s=arc-20160816; b=YjDPIQd3y2kpjEBYNBGrRq+cy/VOjQSECqHcRaO5oMIlKzvPkaHCPXRkoRfkRsThLX QeYqS5av52Sxk8PVohDg+p5onbcxYqauDaHkFpBqbMYrE15XLYJvjqBodftS3qLRjupu D2BW77/g/AC84Iq4UEyfFqd3coHDuSzkP9ovq6kZ93qFiUNfFkeakA9P+yjtC75/fyck udVArrKH2GdloYn/o/Jr88A9LQzMZjtH8Fu3/86D8MIuFZ69pPj6yBoqE8crgwTbH3gx AO3t1Sy0rIcPr/SNKa9uOpkIRrPf+txVMIiYSjOf3NF2dkhFscHUkjBouANNi4nZxuB3 /xow== 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=ikUZzEB5I5Nehs7sVU1WeIaxCZi2Fx3EHlR7/8OM9/M=; fh=habjxf0YG4WcSNEaenG3Vo3U89MQlBfQp/ZbK3+3bDw=; b=QLuwRKHOc1YcuxtydJ7QZsPSFLjOWeFWi+lUh/0j3Iy98NepKf3q20ud9ef4IjpwsI td7LH5AFh8isOtcrXGYCq1ksHMK38pe/aRMR+HFEbrSvBTrw5Rf4BYzrcVoYBR/6693d 7lIu7rWCiyaFCnmwUkzTPJ2XcJX0VgwnvfUGPjDjVD7oLA3PiBPC8m2YyDzxFkv/fMGr F2IP2GwsJwJABmK+4SYHmk1nrM1TNXLa0WbsEjfzM1+3iZ1SPx560YGRKu7O5vWQb/3o kAy/9v4Lv8JxXWI+8tppiT//88AXY4bWPtGzOH1il4KzQjk8THq4vr8ylnTQ9Gy44XlT LyDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="L2ka/jxM"; 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 pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id j13-20020a17090a840d00b00286d8cf5b5dsi2437018pjn.149.2023.12.07.23.31.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 23:31:45 -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="L2ka/jxM"; 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 23754823D9E9; 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 S1573344AbjLHHbc (ORCPT + 99 others); Fri, 8 Dec 2023 02:31:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1573264AbjLHHbP (ORCPT ); Fri, 8 Dec 2023 02:31:15 -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 988D819A2 for ; Thu, 7 Dec 2023 23:31:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702020673; 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=ikUZzEB5I5Nehs7sVU1WeIaxCZi2Fx3EHlR7/8OM9/M=; b=L2ka/jxMRo30TyqExkZcIoFflqyAx4+KtUsBQIH//LdLZz1fq7l3R6vfi4nMmputSoOfRh 67fxAr3srr9n8yU1zUgHiMmqo9hDJuLnycBYdvBIRzIDLHxZKcBFR3wCmPxRw6y2WMBmNa DzB8N1sIJh/AZKD4M3kmi4paAPFZ820= 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-540-Kgqun5sNNqKgQtHaeJfxqA-1; Fri, 08 Dec 2023 02:31:10 -0500 X-MC-Unique: Kgqun5sNNqKgQtHaeJfxqA-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 7AE9B185A782; Fri, 8 Dec 2023 07:31:09 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.72.112.9]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3517E8CD0; Fri, 8 Dec 2023 07:31:04 +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 5/5] x86, kexec: fix the wrong ifdeffery CONFIG_KEXEC Date: Fri, 8 Dec 2023 15:30:36 +0800 Message-ID: <20231208073036.7884-6-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 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=ham 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:42 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784698063403649238 X-GMAIL-MSGID: 1784698063403649238 With the current ifdeffery CONFIG_KEXEC, get_cmdline_acpi_rsdp() is only available when kexec_load interface is taken, while kexec_file_load interface can't make use of it. Now change it to CONFIG_KEXEC_CORE. Signed-off-by: Baoquan He --- arch/x86/boot/compressed/acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/boot/compressed/acpi.c b/arch/x86/boot/compressed/acpi.c index 55c98fdd67d2..18d15d1ce87d 100644 --- a/arch/x86/boot/compressed/acpi.c +++ b/arch/x86/boot/compressed/acpi.c @@ -178,7 +178,7 @@ static unsigned long get_cmdline_acpi_rsdp(void) { unsigned long addr = 0; -#ifdef CONFIG_KEXEC +#ifdef CONFIG_KEXEC_CORE char val[MAX_ADDR_LEN] = { }; int ret;