Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp575268rwb; Thu, 22 Sep 2022 03:50:05 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5Zw3y+LkEJwYXgxyXvJtjXgQw+KtDb8yfyBXC9UCI4E5Tfr5zaP5/K/7rINzuqj6mVkun6 X-Received: by 2002:a05:6402:400e:b0:44f:1b9d:9556 with SMTP id d14-20020a056402400e00b0044f1b9d9556mr2633187eda.208.1663843805725; Thu, 22 Sep 2022 03:50:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663843805; cv=none; d=google.com; s=arc-20160816; b=dGRjoQuZtAyAAdeeWWHv1oeyYP9+Odvm7KgYRwom3alI5gBpaphUsHx10IHX6d+YsP rlGzLwD1XwqcGZEB+DUfaShe4AUxFToMToSrbsOEk0VgiwNPxx5RvE96oh28Vc+hG3SD mwgEHdFsB2mE6EqtseuEogPBH2Xok486rMRQowjyEQSB/4xt4hblnXqntnL3s4YE/IF/ bDzlGh6seNGFTidQjJ9yk5Kta1uGj/5T+7yhpXV+o9SeUfh+UdCx5mJFy2jZ+fsCbvEt pJXJb7J+VY7Atj5zhgVWkNXIC0FYyQrIVxKIlcS9XILlZQIjCpIEyv/qH5wOjNYshjjh HDOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=c8uT+Dy1I0QFtCX2pxOrTUfBUToQKiH5gy9iTKfonXg=; b=BeL5QuqQuavayw/1d2SWNKJQgeDtvr+L7edpBGH2is9ib0qpaF8SVExhywnCfskxsp KrC0+ayk4rIlal1GcvitlFgTunJqZo8SBMp1irXrgJFzARA4kGk2rMju5n8EXUGmm9uY ygE2K+9APBPNIGFLAE3z6b5IzZKMzEzkjUOdM8Oc1+YK5/wxOPcuddXL7ONAg8Gdsisl 6w/XQe6eTe0xfh2zeg+wG/ENIkFOaJ3Gd/3Ejk/XjuipVK4Z/JbYW6jph/GpNZ/DuM8U mu5wW1DvilxeFFjPh/ttPPN3md55pEAAnbuMND/6pI5b7J+KIA8qKDB0vExxsMgd3MC5 4YPg== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r17-20020a05640251d100b0044ee8bcde76si6383689edd.202.2022.09.22.03.49.40; Thu, 22 Sep 2022 03:50:05 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229560AbiIVKbX (ORCPT + 99 others); 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: AQAAf8Bx32tdOSxj5w0gAA--.48410S3 X-Coremail-Antispam: 1UD129KBjvdXoWrtFW3JryfAF4UWw48tF48Crg_yoWDKrbE9w 47Wrn5GF1fXrsrtan8Kr13tF98t3y0vF1YgryIv3y5A348tw48W39IywnYyF1kXrWkAanx Ars8ZrZYyw1I9jkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUb-xYjsxI4VWkKwAYFVCjjxCrM7AC8VAFwI0_Gr0_Xr1l1xkIjI8I 6I8E6xAIw20EY4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l8cAvFVAK0II2c7xJM2 8CjxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVW8JVW5JwA2z4x0Y4vE2Ix0 cI8IcVCY1x0267AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I 8E87Iv6xkF7I0E14v26rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI 64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVW8JVWxJw Am72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IY64vIr41lFIxGxcIEc7CjxVA2Y2ka0xkIwI1l c7I2V7IY0VAS07AlzVAYIcxG8wCY02Avz4vE14v_Gw1l42xK82IYc2Ij64vIr41l4I8I3I 0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWU GVWUWwC2zVAF1VAY17CE14v26r1q6r43MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI 0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r4j6F4UMIIF0xvE42xK8VAvwI8IcIk0 rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r 4UJbIYCTnIWIevJa73UjIFyTuYvjxUgHanUUUUU X-CM-SenderInfo: 5wdqw5prxox03j6o00pqjv00gofq/ X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_PASS,SPF_PASS 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 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. >