Received: by 2002:a19:771d:0:0:0:0:0 with SMTP id s29csp1246781lfc; Wed, 1 Jun 2022 12:59:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHmyAojovTo+GSKNnvKELO9xHd1oGX5vYB6ozS+dBhTCHOcQQzsI+JLsHna+GSO6VSB5NQ X-Received: by 2002:a63:5706:0:b0:3fc:a31b:9083 with SMTP id l6-20020a635706000000b003fca31b9083mr865359pgb.333.1654113590098; Wed, 01 Jun 2022 12:59:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654113590; cv=none; d=google.com; s=arc-20160816; b=qh/4bTvVIFSOgTLiHY8Xl2AVlu5u5egVN5ATEX0igYgIIc7ViNruREcOSi0qSE+jZr REmHyXiEk+xCZwxdPUc6HI+XUh7MJokdleB/W1Ce+42pgMSFLSxAh+yTK9imgopF4jpE 6KGtaoP/VVmx02Z/RPdMn4ZnTYQvrB6feF1/WaTQWVN5bCGQG0wvQGg/hFX+jlZaS8Am VRGIJ2EGcHnI2odP0EeIVRl/C7hGbOiEkSqLMANSdKwFFoTUYQhksixl1oyqWCwbABXz 6OrP6zrKX3scy4TXmLbuFpzCcZ6vLezmhHixqsqno7IaofKUj+Jpt88cKdb+WqnWYGAE 5NLQ== 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:to:from:cc:in-reply-to:subject:date:dkim-signature; bh=+jxnpPySjns9WZXtYAeSufhkP2YRQS3HOSHZmGEDZ04=; b=jD3NwEKmqg2FbB14c8Ai0lObmLD5YsgTHTp6gABNrXUZdFwU12FCfRlwCpqlnLe0+D L2LiWqoxax3YyAzs/uzGBydXo3DPg2RtkwXE+oB48ziG/+6LHHSQlOl98ZyzSCMcx+Kf 1Eo8gce4G1tjpTSH2Xp3zg5Qu6ca0uegxEtOt1nzoFefg9GcfTyfulf9LI0dQZFMJAMV T0SGnZYqxQ02n0L6mSIw/Qeko9gwuIP+1EiUSCMvPbL/F9tP0DrFNiOyRtr7msWc/JU0 OHJhIT4LYr7RuLwy6hgvfDKDkZoemRCbD+TS65/AAP14BSiFTDmMCKbOwLDCkL3bD6pW wamg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b="5wcFHM/I"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id t10-20020a17090abc4a00b001c6f8b9aea5si3286261pjv.42.2022.06.01.12.59.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 12:59:50 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b="5wcFHM/I"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B82B8152DA7; Wed, 1 Jun 2022 12:18:30 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345849AbiEaPp2 (ORCPT + 99 others); Tue, 31 May 2022 11:45:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237200AbiEaPp0 (ORCPT ); Tue, 31 May 2022 11:45:26 -0400 Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B577F8CB1F for ; Tue, 31 May 2022 08:45:25 -0700 (PDT) Received: by mail-pl1-x636.google.com with SMTP id t2so5569962pld.4 for ; Tue, 31 May 2022 08:45:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; h=date:subject:in-reply-to:cc:from:to:message-id:mime-version :content-transfer-encoding; bh=+jxnpPySjns9WZXtYAeSufhkP2YRQS3HOSHZmGEDZ04=; b=5wcFHM/I1reVsJZKJ07bukcm1kBKagjnExNBI/xeoY/NTq2btN/4etr2hsEdw+VjFY njuEiKUEWBstz3Z6YWlCe0XhV8VUAn9rD3Z1Hc+vOQAGnsh6wv2MBchoWxLBXBJaE/qi aoo3RjfTDGBFAV2vbqK7AD515kHowYwxWU4UyOebqqWZLaY6QrpHLZDdfv3yDGcQM6Bx PP+VFt+dNd18lElH2Jv5oPozlWChl9bhqYU8fzaWwTGKDZY4eH3g+ZTGER3U9hER6/LM GEIV0308TxjluKDt9+lZ2/En5R+cg8sZ1Gt4rrv5PeoY2axRbQSl1I1+CuVO4Ik3RvRF AFJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:subject:in-reply-to:cc:from:to:message-id :mime-version:content-transfer-encoding; bh=+jxnpPySjns9WZXtYAeSufhkP2YRQS3HOSHZmGEDZ04=; b=fREXPqaZ2436+OIi6Mskg89MSJnI0P1zBVkIkOV44fYKCNerfVjhgtNraqU76QIKGa n4OuPShED4sji3C/uiCk3Wv21sKz5DLbSKLts7z7xOMzNoGCI7Kx7j4onQNqU9+1Glam wi+QSroKmsunO0bT6jjboy3Id1S0pY/XTaLyyDVKJooZ3s9ukqv7Wd93mRyzAbMGpx+k 9w/AQ/CVd+mQcPygE0INLhBe3zIG1LsJP/WoDh8kWCveo6j04G+u3u/JgDOqubz4PxJp UmoVE7jgm99SIW2LFU6iYjPJ3ecz/T8vLBXf6Z7SxMyXSxxy/OFV2UHx+MEc/dJHEgq2 J/Uw== X-Gm-Message-State: AOAM5309U5lxe9kv5EIFVGL0M9AfoJ1IngrB11CiwsssZTQNHq4wMnKI G/mLSBcWIJUkx6b7TP7NfSSo8Sd4YMADyA== X-Received: by 2002:a17:90b:4d90:b0:1e3:3025:66fe with SMTP id oj16-20020a17090b4d9000b001e3302566femr5672640pjb.145.1654011925129; Tue, 31 May 2022 08:45:25 -0700 (PDT) Received: from localhost ([12.3.194.138]) by smtp.gmail.com with ESMTPSA id q16-20020a170902eb9000b0015ea95948ebsm5318319plg.134.2022.05.31.08.45.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 May 2022 08:45:24 -0700 (PDT) Date: Tue, 31 May 2022 08:45:24 -0700 (PDT) X-Google-Original-Date: Tue, 31 May 2022 08:45:23 PDT (-0700) Subject: Re: [PATCH] RISC-V: Prepare dropping week attribute from arch_kexec_apply_relocations[_add] In-Reply-To: <20220531055803.prq5fj6lajzqiiiu@pengutronix.de> CC: wangkefeng.wang@huawei.com, guoren@linux.alibaba.com, sunnanyong@huawei.com, jszhang@kernel.org, mick@ics.forth.gr, linux-riscv@lists.infradead.org, Stephen Rothwell , alex@ghiti.fr, christophe.leroy@csgroup.eu, naveen.n.rao@linux.vnet.ibm.com, lizhengyu3@huawei.com, aou@eecs.berkeley.edu, liaochang1@huawei.com, Paul Walmsley , Bjorn Topel , kexec@lists.infradead.org, linux-kernel@vger.kernel.org, penberg@kernel.org, ebiederm@xmission.com, kernel@pengutronix.de, akpm@linux-foundation.org, linuxppc-dev@lists.ozlabs.org From: Palmer Dabbelt To: u.kleine-koenig@pengutronix.de Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 On Mon, 30 May 2022 22:58:03 PDT (-0700), u.kleine-koenig@pengutronix.de wrote: > On Mon, May 30, 2022 at 04:11:27PM -0700, Palmer Dabbelt wrote: >> On Mon, 30 May 2022 12:41:33 PDT (-0700), u.kleine-koenig@pengutronix.de wrote: >> > Hello, >> > >> > On Mon, May 30, 2022 at 11:58:16AM -0700, Palmer Dabbelt wrote: >> > > On Mon, 30 May 2022 00:42:02 PDT (-0700), u.kleine-koenig@pengutronix.de wrote: >> > > > Without this change arch/riscv/kernel/elf_kexec.c fails to compile once >> > > > commit 233c1e6c319c ("kexec_file: drop weak attribute from >> > > > arch_kexec_apply_relocations[_add]") is also contained in the tree. >> > > > This currently happens in next-20220527. >> > > > > Prepare the RISC-V similar to the s390 adaption done in >> > > 233c1e6c319c. >> > > > This is safe to do on top of the riscv change even without the change to >> > > > arch_kexec_apply_relocations. >> > > > > Fixes: 838b3e28488f ("RISC-V: Load purgatory in kexec_file") >> > > > Looks-good-to: liaochang (A) >> > > > Signed-off-by: Uwe Kleine-König >> > > > --- >> > > > > On Mon, May 30, 2022 at 09:43:26AM +0800, liaochang (A) wrote: >> > > > > > I can confirm that doing >> > > > > > > diff --git a/arch/riscv/include/asm/kexec.h >> > > > > b/arch/riscv/include/asm/kexec.h >> > > > > > index 206217b23301..eee260e8ab30 100644 >> > > > > > --- a/arch/riscv/include/asm/kexec.h >> > > > > > +++ b/arch/riscv/include/asm/kexec.h >> > > > > > @@ -55,6 +55,13 @@ extern riscv_kexec_method riscv_kexec_norelocate; >> > > > > > > #ifdef CONFIG_KEXEC_FILE >> > > > > > extern const struct kexec_file_ops elf_kexec_ops; >> > > > > > + >> > > > > > +struct purgatory_info; >> > > > > > +int arch_kexec_apply_relocations_add(struct purgatory_info *pi, >> > > > > > + Elf_Shdr *section, >> > > > > > + const Elf_Shdr *relsec, >> > > > > > + const Elf_Shdr *symtab); >> > > > > > +#define arch_kexec_apply_relocations_add arch_kexec_apply_relocations_add >> > > > > > #endif >> > > > > > > #endif >> > > > > > > LGTM, you could send a fixup patch to riscv, thanks. >> > > > > > > > > on top of 838b3e28488f results in a compilable tree. And >> > > when >> > > > > merging >> > > > > > 233c1e6c319c into this, it is still building. >> > > > > > > I'm not enough into kexec (and riscv) to judge if this is >> > > > > sensible, or >> > > > > > create a useful commit log but the obvious way forward is to apply the >> > > > > > above patch to the riscv tree before it hits Linus' tree. >> > > > > Ok, here comes a patch with a generic commit log. >> > > > > @riscv people: If you prefer, squash it into 838b3e28488f. >> > > >> > > Sorry, just saw this after I sent my version of the fix. They're the same, >> > > but do you mind sending a full-on patch so I can merge it? >> > >> > Sorry, I don't understand your request. I found >> > https://lore.kernel.org/linux-riscv/20220530180408.16239-1-palmer@rivosinc.com/ >> > >> > but I don't know what a full-on patch is and what stops you merging my >> > patch. >> > >> > Is it that it's in reply to a patch series and b4 fails to fetch the >> > right patch and you ask to send it in a new thread? >> >> Ya, with the reply bits in there my mail merge (which unfortunately isn't >> b4, I haven't gotten around to converting yet) got tripped up. It's kind of >> easy to for me to screw something up trying to pull bits out of replies and >> such, but I think this one was pretty simple (looks like maybe some PGP or >> MIME thing was the issue). >> >> I just put >> on my staging branch, it looks OK to me but LMK if there's a problem. > > there is indeed a problem, but caused by me: If you are ready to rewrite > it, please do s/week/weak/ in the subject line. Otherwise looks good to > me. Ah, sorry, I missed that too. I was hoping to send a PR this morning, I'd usually just rewrite and delay this one but given it's necessary to make the post-merge build work I'm going to just send it up with the spelling error. > > Best regards and thanks, > Uwe > > -- > Pengutronix e.K. | Uwe Kleine-König | > Industrial Linux Solutions | https://www.pengutronix.de/ |