[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200817134224.GA8381@bug>
Date: Mon, 17 Aug 2020 15:42:24 +0200
From: Pavel Machek <pavel@....cz>
To: Sang Yan <sangyan@...wei.com>
Cc: kexec@...ts.infradead.org, ebiederm@...ssion.com,
linux-kernel@...r.kernel.org, xiexiuqi@...wei.com,
guohanjun@...wei.com, zhuling8@...wei.com, luanjianhai@...wei.com,
luchunhua@...wei.com
Subject: Re: [PATCH 1/2] kexec: Add quick kexec support for kernel
Hi!
> +config QUICK_KEXEC
> + bool "Support for quick kexec"
> + depends on KEXEC_CORE
> + help
> + Say y here to enable this feature.
?
> + It use reserved memory to accelerate kexec, just like crash
uses
> + kexec, load new kernel and initrd to reserved memory, and
> + boot new kernel on that memory. It will save the time of
> + relocating kernel.
loads a new.... boots new...
> IORES_DESC_DEVICE_PRIVATE_MEMORY = 6,
> IORES_DESC_RESERVED = 7,
> IORES_DESC_SOFT_RESERVED = 8,
> +#ifdef CONFIG_QUICK_KEXEC
> + IORES_DESC_QUICK_KEXEC = 9,
> +#endif
> };
Remove ifdef.
> /*
> diff --git a/include/linux/kexec.h b/include/linux/kexec.h
> index 9e93bef52968..976bf9631070 100644
> --- a/include/linux/kexec.h
> +++ b/include/linux/kexec.h
> @@ -269,9 +269,12 @@ struct kimage {
> unsigned long control_page;
>
> /* Flags to indicate special processing */
> - unsigned int type : 1;
> + unsigned int type : 2;
> #define KEXEC_TYPE_DEFAULT 0
> #define KEXEC_TYPE_CRASH 1
> +#ifdef CONFIG_QUICK_KEXEC
> +#define KEXEC_TYPE_QUICK 2
> +#endif
> unsigned int preserve_context : 1;
Here, too.
> +++ b/include/uapi/linux/kexec.h
> @@ -12,6 +12,9 @@
> /* kexec flags for different usage scenarios */
> #define KEXEC_ON_CRASH 0x00000001
> #define KEXEC_PRESERVE_CONTEXT 0x00000002
> +#ifdef CONFIG_QUICK_KEXEC
> +#define KEXEC_QUICK 0x00000004
> +#endif
> #define KEXEC_ARCH_MASK 0xffff0000
And here.
Pavel
Powered by blists - more mailing lists