From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51A6EC6FA8B for ; Thu, 22 Sep 2022 10:31:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230461AbiIVKbX (ORCPT ); Thu, 22 Sep 2022 06:31:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231522AbiIVKbT (ORCPT ); Thu, 22 Sep 2022 06:31:19 -0400 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C41DBD691D for ; Thu, 22 Sep 2022 03:31:17 -0700 (PDT) Received: from [10.130.0.193] (unknown [113.200.148.30]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Bx32tdOSxj5w0gAA--.48410S3; Thu, 22 Sep 2022 18:30:54 +0800 (CST) Subject: Re: [PATCH v3 1/3] LoongArch: Add kexec support To: Xi Ruoyao , Huacai Chen , Baoquan He , Eric Biederman References: <1663210426-15446-1-git-send-email-tangyouling@loongson.cn> <1663210426-15446-2-git-send-email-tangyouling@loongson.cn> Cc: WANG Xuerui , Vivek Goyal , Dave Young , Guo Ren , Jiaxun Yang , kexec@lists.infradead.org, loongarch@lists.linux.dev, linux-kernel@vger.kernel.org From: Youling Tang Message-ID: <75a059e8-108f-93f5-5d4e-01b09224f419@loongson.cn> Date: Thu, 22 Sep 2022 18:30:53 +0800 User-Agent: Mozilla/5.0 (X11; Linux mips64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-CM-TRANSID: AQAAf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r 4UJbIYCTnIWIevJa73UjIFyTuYvjxUgHanUUUUU X-CM-SenderInfo: 5wdqw5prxox03j6o00pqjv00gofq/ Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Ruoyao On 09/22/2022 06:00 PM, Xi Ruoyao wrote: > On Thu, 2022-09-15 at 10:53 +0800, Youling Tang wrote: >> +int machine_kexec_prepare(struct kimage *kimage) >> +{ >> + int i; >> + void *dtb = (void *)KEXEC_BLOB_ADDR; >> + >> + kexec_image_info(kimage); >> + >> + /* Find the Flattened Device Tree */ >> + for (i = 0; i < kimage->nr_segments; i++) { >> + if (!fdt_check_header(kimage->segment[i].buf)) { > > Hi Youling, > > When I build Huacai's tree > (https://github.com/loongson/linux/commits/loongarch-next), there is a > strange error linking vmlinux: > > ld: arch/loongarch/kernel/machine_kexec.o: in function `machine_kexec_prepare': > /home/xry111/git-repos/linux/arch/loongarch/kernel/machine_kexec.c:70: undefined reference to `fdt_check_header' > > Not sure why... This is because of the problem after efistub removes the fdt modification, I will reimplement kexec/kdump. This build error can be avoided by turning off CONFIG_KEXEC temporarily, tomorrow I will submit a new kexec/kdump implementation. Thanks, Youling. >