Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp1016494iol; Thu, 9 Jun 2022 20:52:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyazen72v4xkhUrvNorkc9XbgdAiQoA/0NW7tdhlJxis5Hsgs6N26bPrdK2TKlmmJVXvVb4 X-Received: by 2002:a62:a50c:0:b0:510:6b52:cd87 with SMTP id v12-20020a62a50c000000b005106b52cd87mr43253289pfm.30.1654833142597; Thu, 09 Jun 2022 20:52:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654833142; cv=none; d=google.com; s=arc-20160816; b=hjlKVvXA+trfLHVsEB4GfB4Iavts2G+EdjBZ1yqqp1FqEEnpdB1hlHsWtfqtIlYz3n Sh6Nb4xOgaNrkn9szZ2hC4fLIgMBsVs+GLtmt1Vu/t9lGJ8wFGpY6KF18yhxjbs+bnEp RjnrhnEGup85nOH/WzSDusaz6d0LbdSWSuwcng97mDP9t3ee0Yhhz7zHB8mZOnJw0Lfe RYyk9EngF/M+c53kWe1+DCrRe1M5YHFSkHwxz2EDR3nJ+3ZARZ0FgRpppr0gkn7jyPvw 4P1fwkKflIKlyjYw9sQ+hiGue1AcMRivLfkx0IMDdnV7qyvKHZHIU+d9TjiAgSGm80/D N4rA== 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 :message-id:date:subject:cc:to:from; bh=h9RMBpT3RDQS8CPaH2KJyNejOEAGT+PcklazBc5LIiQ=; b=qqXg3h7ECgKc90C8dYEjTfjSe0yxWhUDO1/ZDrU5kSV7Cxa0BthZCk1HdeSjmJrNpi ZMjDrzwcoUma37tvfmLEMEqWAOQWtBV77juq0jqhCEEWpvdp26AkC0Bsh9UY1Z5RzXi7 NwMvEDMX4InqNxjYi4YuQHAdYJCDphCxeJR3h68PjOAc6ItkYOocObaScBWVy7Hooxxf wLwiJGP2jAFofR7036Rg0MJkkLsej+W1XQ2nDq/rBD/4pHB/JApQlniKuyaAnMD9Ilub beO6Bda367vV/zRWoUdJyX6HbMWqNap0DeU1Lvds3b/GvttZX1oSRZZIBZMXG5O6XdkQ jI8w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oa8-20020a17090b1bc800b001e85248c27esi1553627pjb.139.2022.06.09.20.52.08; Thu, 09 Jun 2022 20:52:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241735AbiFJDqj (ORCPT + 99 others); Thu, 9 Jun 2022 23:46:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234635AbiFJDqi (ORCPT ); Thu, 9 Jun 2022 23:46:38 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45F064B1FC for ; Thu, 9 Jun 2022 20:46:33 -0700 (PDT) Received: from dggpemm500020.china.huawei.com (unknown [172.30.72.56]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4LK6KN4GnJz1K9BP; Fri, 10 Jun 2022 11:44:40 +0800 (CST) Received: from dggpemm500016.china.huawei.com (7.185.36.25) by dggpemm500020.china.huawei.com (7.185.36.49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 10 Jun 2022 11:46:31 +0800 Received: from huawei.com (10.67.174.33) by dggpemm500016.china.huawei.com (7.185.36.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 10 Jun 2022 11:46:31 +0800 From: "GONG, Ruiqi" To: Paul Walmsley , Palmer Dabbelt , Albert Ou , Liao Chang , Li Zhengyu CC: , , "Wang Weiyang" , Gong Ruiqi Subject: [PATCH] RISC-V: Fix a linkage error related to CONFIG_KEXEC{,_FILE} Date: Fri, 10 Jun 2022 19:46:59 +0800 Message-ID: <20220610114659.1506718-1-gongruiqi1@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.67.174.33] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpemm500016.china.huawei.com (7.185.36.25) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DATE_IN_FUTURE_06_12, RCVD_IN_DNSWL_MED,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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Following files (currently compiled with CONFIG_KEXEC=y) are needed to be linked with kernel/kexec_core.o (compiled with CONFIG_KEXEC_CORE=y): arch/riscv/kernel/kexec_relocate.o, arch/riscv/kernel/crash_save_regs.o, arch/riscv/kernel/machine_kexec.o But CONFIG_KEXEC_CORE can also be selected by CONFIG_KEXEC_FILE regardless of CONFIG_KEXEC, which causes the problem as the Link specifies. Fix this problem by changing the controling config of the above arch/riscv/kernel/*.o to be CONFIG_KEXEC_CORE, as how some other architectures do. Link: https://lore.kernel.org/all/202206100324.B0KDSd1C-lkp@intel.com/ Reported-by: kernel test robot Fixes: 6261586e0c91 ("RISC-V: Add kexec_file support") Signed-off-by: GONG, Ruiqi --- arch/riscv/kernel/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/kernel/Makefile b/arch/riscv/kernel/Makefile index c71d6591d539..33bb60a354cd 100644 --- a/arch/riscv/kernel/Makefile +++ b/arch/riscv/kernel/Makefile @@ -78,7 +78,7 @@ obj-$(CONFIG_SMP) += cpu_ops_sbi.o endif obj-$(CONFIG_HOTPLUG_CPU) += cpu-hotplug.o obj-$(CONFIG_KGDB) += kgdb.o -obj-$(CONFIG_KEXEC) += kexec_relocate.o crash_save_regs.o machine_kexec.o +obj-$(CONFIG_KEXEC_CORE) += kexec_relocate.o crash_save_regs.o machine_kexec.o obj-$(CONFIG_KEXEC_FILE) += elf_kexec.o machine_kexec_file.o obj-$(CONFIG_CRASH_DUMP) += crash_dump.o -- 2.25.1