Re: [PATCH v2 14/16] x86,nvdimm,kexec: Use walk_iomem_res_desc() for iomem search

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ccing kexec maillist.

On 12/25/15 at 03:09pm, Toshi Kani wrote:
> diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c
> index c245085..e2bd737 100644
> --- a/kernel/kexec_file.c
> +++ b/kernel/kexec_file.c
> @@ -522,10 +522,10 @@ int kexec_add_buffer(struct kimage *image, char *buffer, unsigned long bufsz,
>  
>  	/* Walk the RAM ranges and allocate a suitable range for the buffer */
>  	if (image->type == KEXEC_TYPE_CRASH)
> -		ret = walk_iomem_res("Crash kernel",
> -				     IORESOURCE_SYSTEM_RAM | IORESOURCE_BUSY,
> -				     crashk_res.start, crashk_res.end, kbuf,
> -				     locate_mem_hole_callback);
> +		ret = walk_iomem_res_desc(IORES_DESC_CRASH_KERNEL,

Since crashk_res's desc has been assigned to IORES_DESC_CRASH_KERNEL, it
is better to use crashk_res.desc, instead of using
IORES_DESC_CRASH_KERNEL directly.

Thanks
Minfei

> +				IORESOURCE_SYSTEM_RAM | IORESOURCE_BUSY,
> +				crashk_res.start, crashk_res.end, kbuf,
> +				locate_mem_hole_callback);
>  	else
>  		ret = walk_system_ram_res(0, -1, kbuf,
>  					  locate_mem_hole_callback);
--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux