public inbox for linux-efi@vger.kernel.org
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Andrew Morton <akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
Cc: Matt Fleming
	<matt-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	kexec-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org,
	hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org,
	mjg59-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org,
	greg-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org,
	bp-Gina5bIWoIWzQB+pC5nmwQ@public.gmane.org,
	dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	chaowang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 15/15] kexec: Support kexec/kdump on EFI systems
Date: Tue, 1 Jul 2014 16:21:52 -0400	[thread overview]
Message-ID: <20140701202152.GB19352@redhat.com> (raw)
In-Reply-To: <20140701131419.454a3fc32fcc84a43b668c50-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>

On Tue, Jul 01, 2014 at 01:14:19PM -0700, Andrew Morton wrote:
> On Tue, 1 Jul 2014 20:46:05 +0100 Matt Fleming <matt-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org> wrote:
> 
> > > +int get_efi_runtime_map_size(void)
> > > +{
> > > +	return nr_efi_runtime_map * efi_memdesc_size;
> > > +}
> > > +
> > > +int get_efi_runtime_map_desc_size(void)
> > > +{
> > > +	return efi_memdesc_size;
> > > +}
> > > +
> > > +int efi_runtime_map_copy(void *buf, size_t bufsz)
> > > +{
> > > +	size_t sz = get_efi_runtime_map_size();
> > > +
> > > +	if (sz > bufsz)
> > > +		sz = bufsz;
> > > +
> > > +	memcpy(buf, efi_runtime_map, sz);
> > > +	return 0;
> > > +}
> > 
> > Could we prefix these with efi_, e.g. efi_get_runtime_map_size() ?
> 
> This?
> 
> From: Andrew Morton <akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
> Subject: kexec-support-kexec-kdump-on-efi-systems-fix
> 
> s/get_efi/efi_get/g, per Matt
> 
> Cc: Vivek Goyal <vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> Cc: Matt Fleming <matt-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
> Signed-off-by: Andrew Morton <akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>

Looks good to me. Thanks Andrew.

Vivek

> ---
> 
>  arch/x86/kernel/kexec-bzimage64.c  |    4 ++--
>  drivers/firmware/efi/runtime-map.c |    6 +++---
>  include/linux/efi.h                |    8 ++++----
>  3 files changed, 9 insertions(+), 9 deletions(-)
> 
> diff -puN arch/x86/kernel/kexec-bzimage64.c~kexec-support-kexec-kdump-on-efi-systems-fix arch/x86/kernel/kexec-bzimage64.c
> --- a/arch/x86/kernel/kexec-bzimage64.c~kexec-support-kexec-kdump-on-efi-systems-fix
> +++ a/arch/x86/kernel/kexec-bzimage64.c
> @@ -181,7 +181,7 @@ setup_efi_state(struct boot_params *para
>  	ei->efi_systab_hi = current_ei->efi_systab_hi;
>  
>  	ei->efi_memdesc_version = current_ei->efi_memdesc_version;
> -	ei->efi_memdesc_size = get_efi_runtime_map_desc_size();
> +	ei->efi_memdesc_size = efi_get_runtime_map_desc_size();
>  
>  	setup_efi_info_memmap(params, params_load_addr, efi_map_offset,
>  			      efi_map_sz);
> @@ -397,7 +397,7 @@ void *bzImage64_load(struct kimage *imag
>  	 * have to create separate segment for each. Keeps things
>  	 * little bit simple
>  	 */
> -	efi_map_sz = get_efi_runtime_map_size();
> +	efi_map_sz = efi_get_runtime_map_size();
>  	efi_map_sz = ALIGN(efi_map_sz, 16);
>  	params_cmdline_sz = sizeof(struct boot_params) + cmdline_len +
>  				MAX_ELFCOREHDR_STR_LEN;
> diff -puN drivers/firmware/efi/runtime-map.c~kexec-support-kexec-kdump-on-efi-systems-fix drivers/firmware/efi/runtime-map.c
> --- a/drivers/firmware/efi/runtime-map.c~kexec-support-kexec-kdump-on-efi-systems-fix
> +++ a/drivers/firmware/efi/runtime-map.c
> @@ -138,19 +138,19 @@ add_sysfs_runtime_map_entry(struct kobje
>  	return entry;
>  }
>  
> -int get_efi_runtime_map_size(void)
> +int efi_get_runtime_map_size(void)
>  {
>  	return nr_efi_runtime_map * efi_memdesc_size;
>  }
>  
> -int get_efi_runtime_map_desc_size(void)
> +int efi_get_runtime_map_desc_size(void)
>  {
>  	return efi_memdesc_size;
>  }
>  
>  int efi_runtime_map_copy(void *buf, size_t bufsz)
>  {
> -	size_t sz = get_efi_runtime_map_size();
> +	size_t sz = efi_get_runtime_map_size();
>  
>  	if (sz > bufsz)
>  		sz = bufsz;
> diff -puN include/linux/efi.h~kexec-support-kexec-kdump-on-efi-systems-fix include/linux/efi.h
> --- a/include/linux/efi.h~kexec-support-kexec-kdump-on-efi-systems-fix
> +++ a/include/linux/efi.h
> @@ -1151,8 +1151,8 @@ int efivars_sysfs_init(void);
>  #ifdef CONFIG_EFI_RUNTIME_MAP
>  int efi_runtime_map_init(struct kobject *);
>  void efi_runtime_map_setup(void *, int, u32);
> -int get_efi_runtime_map_size(void);
> -int get_efi_runtime_map_desc_size(void);
> +int efi_get_runtime_map_size(void);
> +int efi_get_runtime_map_desc_size(void);
>  int efi_runtime_map_copy(void *buf, size_t bufsz);
>  #else
>  static inline int efi_runtime_map_init(struct kobject *kobj)
> @@ -1163,12 +1163,12 @@ static inline int efi_runtime_map_init(s
>  static inline void
>  efi_runtime_map_setup(void *map, int nr_entries, u32 desc_size) {}
>  
> -static inline int get_efi_runtime_map_size(void)
> +static inline int efi_get_runtime_map_size(void)
>  {
>  	return 0;
>  }
>  
> -static inline int get_efi_runtime_map_desc_size(void)
> +static inline int efi_get_runtime_map_desc_size(void)
>  {
>  	return 0;
>  }
> _

  parent reply	other threads:[~2014-07-01 20:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1403814824-7587-1-git-send-email-vgoyal@redhat.com>
     [not found] ` <1403814824-7587-1-git-send-email-vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-06-26 20:33   ` [PATCH 15/15] kexec: Support kexec/kdump on EFI systems Vivek Goyal
     [not found]     ` <1403814824-7587-16-git-send-email-vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-07-01 19:46       ` Matt Fleming
     [not found]         ` <20140701194605.GJ7539-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
2014-07-01 20:14           ` Andrew Morton
     [not found]             ` <20140701131419.454a3fc32fcc84a43b668c50-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2014-07-01 20:21               ` Vivek Goyal [this message]
2014-07-01 21:23               ` Matt Fleming
2014-07-01 20:09       ` [PATCH 17/15] kexec-bzimage: Change EFI helper function names Vivek Goyal

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=20140701202152.GB19352@redhat.com \
    --to=vgoyal-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=bp-Gina5bIWoIWzQB+pC5nmwQ@public.gmane.org \
    --cc=chaowang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org \
    --cc=greg-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org \
    --cc=hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org \
    --cc=kexec-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=matt-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org \
    --cc=mjg59-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org \
    /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