Cc: <nigel@...>, Kexec Mailing List <kexec@...>, <linux-kernel@...>, Rafael J. Wysocki <rjw@...>, Eric W. Biederman <ebiederm@...>, Pavel Machek <pavel@...>, Andrew Morton <akpm@...>, Linus Torvalds <torvalds@...>, <mingo@...>, Vivek Goyal <vgoyal@...>
On Wed, Aug 13, 2008 at 11:05:15AM +0800, Huang Ying wrote:
Hi Huang,
I think that 1) with possibly the slight variation of moving
#include <asm/kexec.h> inside #ifdef CONFIG_KEXEC is better
because it avoids introducing kexec_control_code_size,
which is currently only used in arch/x86/kernel/relocate_kernel_32.S
and arch/x86/kernel/vmlinux_32.lds.S, into kexec.h.
/* Link time checks */
#ifdef CONFIG_KEXEC
#include <asm/kexec.h>
ASSERT(kexec_control_code_size <= KEXEC_CONTROL_CODE_MAX_SIZE,
"kexec control code size is too big")
#endif
My second preference would be 3) as it seems simpler than 2).
--