[Patch] kexec: remove duplicated backup_src_start field from struct crash_elf_info

Vivek Goyal vgoyal at redhat.com
Thu Apr 28 09:15:39 EDT 2011


On Thu, Apr 28, 2011 at 03:57:48PM +0800, Cong Wang wrote:
> 于 2011年04月27日 23:01, Vivek Goyal 写道:
> >Amerigo,
> >
> >Now who will do following initialization for ppc?
> >
> >info->backup_src_start = BACKUP_SRC_START;
> >info->backup_sz = BACKUP_SRC_END - BACKUP_SRC_START + 1;
> >
> >I think I have concern for mips too.
> 
> Right, we need to initialize them in load_crashdump_segments().
> 
> How about the attached patch? It is untested.
> 

> Signed-off-by: WANG Cong <amwang at redhat.com>

Ok, this one looks better.

Vivek

> diff --git a/kexec/arch/mips/crashdump-mips.c b/kexec/arch/mips/crashdump-mips.c
> index 4fd6c30..e90b362 100644
> --- a/kexec/arch/mips/crashdump-mips.c
> +++ b/kexec/arch/mips/crashdump-mips.c
> @@ -374,6 +374,8 @@ int load_crashdump_segments(struct kexec_info *info, char* mod_cmdline,
>  	if (get_crash_memory_ranges(&mem_range, &nr_ranges) < 0)
>  		return -1;
>  
> +	info->backup_src_start = BACKUP_SRC_START;
> +	info->backup_src_size = BACKUP_SRC_SIZE;
>  	/* Create a backup region segment to store backup data*/
>  	sz = (BACKUP_SRC_SIZE + align - 1) & ~(align - 1);
>  	tmp = xmalloc(sz);
> diff --git a/kexec/arch/ppc/crashdump-powerpc.c b/kexec/arch/ppc/crashdump-powerpc.c
> index 371137c..1dd6485 100644
> --- a/kexec/arch/ppc/crashdump-powerpc.c
> +++ b/kexec/arch/ppc/crashdump-powerpc.c
> @@ -328,6 +328,8 @@ int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline,
>  	if (get_crash_memory_ranges(&mem_range, &nr_ranges) < 0)
>  		return -1;
>  
> +	info->backup_src_start = BACKUP_SRC_START;
> +	info->backup_src_size = BACKUP_SRC_SIZE;
>  	/* Create a backup region segment to store backup data*/
>  	sz = (BACKUP_SRC_SIZE + align - 1) & ~(align - 1);
>  	tmp = xmalloc(sz);
> diff --git a/kexec/arch/ppc64/crashdump-ppc64.c b/kexec/arch/ppc64/crashdump-ppc64.c
> index 6a66f2a..d52b438 100644
> --- a/kexec/arch/ppc64/crashdump-ppc64.c
> +++ b/kexec/arch/ppc64/crashdump-ppc64.c
> @@ -390,6 +390,8 @@ int load_crashdump_segments(struct kexec_info *info, char* mod_cmdline,
>  	if (get_crash_memory_ranges(&mem_range, &nr_ranges) < 0)
>  		return -1;
>  
> +	info->backup_src_start = BACKUP_SRC_START;
> +	info->backup_src_size = BACKUP_SRC_SIZE;
>  	/* Create a backup region segment to store backup data*/
>  	sz = (BACKUP_SRC_SIZE + align - 1) & ~(align - 1);
>  	tmp = xmalloc(sz);




More information about the kexec mailing list