[PATCH v2 14/16] x86, nvdimm, kexec: Use walk_iomem_res_desc() for iomem search
Minfei Huang
mhuang at redhat.com
Sat Dec 26 08:05:22 PST 2015
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);
More information about the kexec
mailing list