linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Young <dyoung@redhat.com>
To: Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com>
Cc: kexec@lists.infradead.org, linuxppc-dev@lists.ozlabs.org,
	linux-kernel@vger.kernel.org,
	Eric Biederman <ebiederm@xmission.com>
Subject: Re: [PATCH v2 2/9] kexec_file: Generalize kexec_add_buffer.
Date: Mon, 20 Jun 2016 10:26:05 +0800	[thread overview]
Message-ID: <20160620022605.GA3180@dhcp-128-65.nay.redhat.com> (raw)
In-Reply-To: <12025213.W8oVnaovm1@hactar>

On 06/17/16 at 05:51pm, Thiago Jung Bauermann wrote:
> Am Freitag, 17 Juni 2016, 15:35:23 schrieb Dave Young:
> > On 06/16/16 at 05:39pm, Thiago Jung Bauermann wrote:
> > > Am Donnerstag, 16 Juni 2016, 09:58:53 schrieb Dave Young:
> > > > On 06/15/16 at 01:21pm, Thiago Jung Bauermann wrote:
> > > > > +int __weak arch_kexec_walk_mem(unsigned int image_type, bool
> > > > > top_down,
> > > > > +			       void *data, int (*func)(u64, u64, void *))
> > > > > +{
> > > > 
> > > > top_down is also not used?
> > > 
> > > It's unused in the default implementation, but the powerpc implementation
> > > in patch 8 uses it:
> > Well, arch_kexec_walk_mem use kbuf as "data", you can even drop
> > "image_type" since kbuf has all you want kbuf->image->type, and
> > kbuf->top_down
> > 
> > int __weak arch_kexec_walk_mem(struct kexec_buf *kbuf,
> > 			       int (*func)(u64, u64, void *))
> 
> Sounds good to me, but I had to move struct kexec_buf from
> kernel/kexec_internal.h to include/linux/kexec.h.
> 
> Here's the updated patch. What do you think?
> 
> []'s
> Thiago Jung Bauermann
> IBM Linux Technology Center
> 
> 
>     kexec_file: Generalize kexec_add_buffer.
>     
>     Allow architectures to specify different memory walking functions for
>     kexec_add_buffer. Intel uses iomem to track reserved memory ranges,
>     but PowerPC uses the memblock subsystem.
>     
>     Signed-off-by: Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com>
>     Cc: Eric Biederman <ebiederm@xmission.com>
>     Cc: Dave Young <dyoung@redhat.com>
>     Cc: kexec@lists.infradead.org
>     Cc: linux-kernel@vger.kernel.org
> 
> diff --git a/include/linux/kexec.h b/include/linux/kexec.h
> index e8acb2b43dd9..d8df01107ae2 100644
> --- a/include/linux/kexec.h
> +++ b/include/linux/kexec.h
> @@ -201,6 +201,20 @@ struct kimage {
>  #endif
>  };
>  
> +/*
> + * Keeps track of buffer parameters as provided by caller for requesting
> + * memory placement of buffer.
> + */
> +struct kexec_buf {
> +	struct kimage *image;
> +	unsigned long mem;
> +	unsigned long memsz;
> +	unsigned long buf_align;
> +	unsigned long buf_min;
> +	unsigned long buf_max;
> +	bool top_down;		/* allocate from top of memory hole */
> +};
> +

kexec_buf should go within #ifdef for kexec file like struct purgatory_info

Other than that it looks good.

Thanks
Dave

  reply	other threads:[~2016-06-20  2:26 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-14 14:59 [PATCH v2 0/9] kexec_file_load implementation for PowerPC Thiago Jung Bauermann
2016-06-14 14:59 ` [PATCH v2 1/9] kexec_file: Remove unused members from struct kexec_buf Thiago Jung Bauermann
2016-06-14 14:59 ` [PATCH v2 2/9] kexec_file: Generalize kexec_add_buffer Thiago Jung Bauermann
2016-06-15  7:33   ` Dave Young
2016-06-15 16:21     ` Thiago Jung Bauermann
2016-06-16  1:58       ` Dave Young
2016-06-16 20:39         ` Thiago Jung Bauermann
2016-06-17  7:35           ` Dave Young
2016-06-17 20:51             ` Thiago Jung Bauermann
2016-06-20  2:26               ` Dave Young [this message]
2016-06-20 16:01                 ` Thiago Jung Bauermann
2016-06-14 14:59 ` [PATCH v2 3/9] kexec_file: Factor out kexec_locate_mem_hole from kexec_add_buffer Thiago Jung Bauermann
2016-06-14 14:59 ` [PATCH v2 4/9] powerpc: Factor out relocation code from module_64.c to elf_util_64.c Thiago Jung Bauermann
2016-06-14 14:59 ` [PATCH v2 5/9] powerpc: Generalize elf64_apply_relocate_add Thiago Jung Bauermann
2016-06-14 14:59 ` [PATCH v2 6/9] powerpc: Add functions to read ELF files of any endianness Thiago Jung Bauermann
2016-06-14 14:59 ` [PATCH v2 7/9] powerpc: Implement kexec_file_load Thiago Jung Bauermann
2016-06-14 14:59 ` [PATCH v2 8/9] powerpc: Add support for loading ELF kernels with kexec_file_load Thiago Jung Bauermann
2016-06-14 14:59 ` [PATCH v2 9/9] powerpc: Add purgatory for kexec_file_load implementation Thiago Jung Bauermann
2016-06-16  5:48 ` [PATCH v2 0/9] kexec_file_load implementation for PowerPC Michael Ellerman
2016-06-16 19:55   ` Thiago Jung Bauermann

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=20160620022605.GA3180@dhcp-128-65.nay.redhat.com \
    --to=dyoung@redhat.com \
    --cc=bauerman@linux.vnet.ibm.com \
    --cc=ebiederm@xmission.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --subject='Re: [PATCH v2 2/9] kexec_file: Generalize kexec_add_buffer.' \
    /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

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).