linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Palmer Dabbelt <palmer@rivosinc.com>
To: u.kleine-koenig@pengutronix.de
Cc: lizhengyu3@huawei.com, alex@ghiti.fr, aou@eecs.berkeley.edu,
	Bjorn Topel <bjorn.topel@gmail.com>,
	guoren@linux.alibaba.com, jszhang@kernel.org,
	kexec@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-riscv@lists.infradead.org, mick@ics.forth.gr,
	Paul Walmsley <paul.walmsley@sifive.com>,
	penberg@kernel.org, sunnanyong@huawei.com,
	wangkefeng.wang@huawei.com, christophe.leroy@csgroup.eu,
	liaochang1@huawei.com, Stephen Rothwell <sfr@canb.auug.org.au>,
	akpm@linux-foundation.org, ebiederm@xmission.com,
	kernel@pengutronix.de, naveen.n.rao@linux.vnet.ibm.com,
	linuxppc-dev@lists.ozlabs.org, lizhengyu3@huawei.com
Subject: Re: [PATCH] RISC-V: Prepare dropping week attribute from arch_kexec_apply_relocations[_add]
Date: Mon, 30 May 2022 11:58:16 -0700 (PDT)	[thread overview]
Message-ID: <mhng-5872aea0-6f64-4685-8f8d-fdeb42e4c972@palmer-mbp2014> (raw)
In-Reply-To: <20220530074202.pydmbbgvbtaugw5j@pengutronix.de>

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) <liaochang1@huawei.com>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>
> 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?

>
> Best regards
> Uwe
>
>  arch/riscv/include/asm/kexec.h | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> 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
>
> base-commit: 838b3e28488f702e2b5477b393f009b2639d2b1a
> -- 
> 2.36.1
>
> -- 
> Pengutronix e.K.                           | Uwe Kleine-König            |
> Industrial Linux Solutions                 | https://www.pengutronix.de/ |

  reply	other threads:[~2022-05-30 18:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-19  9:12 [PATCH v2] kexec_file: Drop weak attribute from arch_kexec_apply_relocations[_add] Naveen N. Rao
2022-05-19 15:17 ` kernel test robot
2022-05-19 17:29   ` Andrew Morton
2022-05-29  6:56 ` Uwe Kleine-König
2022-05-29  9:46   ` Christophe Leroy
2022-05-29 14:06     ` Uwe Kleine-König
2022-05-30  1:43       ` liaochang (A)
2022-05-30  7:42         ` [PATCH] RISC-V: Prepare dropping week " Uwe Kleine-König
2022-05-30 18:58           ` Palmer Dabbelt [this message]
2022-05-30 19:41             ` Uwe Kleine-König
2022-05-30 23:11               ` Palmer Dabbelt
2022-05-31  5:58                 ` Uwe Kleine-König
2022-05-31 15:45                   ` Palmer Dabbelt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=mhng-5872aea0-6f64-4685-8f8d-fdeb42e4c972@palmer-mbp2014 \
    --to=palmer@rivosinc.com \
    --cc=akpm@linux-foundation.org \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=bjorn.topel@gmail.com \
    --cc=christophe.leroy@csgroup.eu \
    --cc=ebiederm@xmission.com \
    --cc=guoren@linux.alibaba.com \
    --cc=jszhang@kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=kexec@lists.infradead.org \
    --cc=liaochang1@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=lizhengyu3@huawei.com \
    --cc=mick@ics.forth.gr \
    --cc=naveen.n.rao@linux.vnet.ibm.com \
    --cc=paul.walmsley@sifive.com \
    --cc=penberg@kernel.org \
    --cc=sfr@canb.auug.org.au \
    --cc=sunnanyong@huawei.com \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=wangkefeng.wang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).