diff options
author | Zhang Yanfei <zhangyanfei@cn.fujitsu.com> | 2013-03-14 01:35:26 +0800 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2013-03-14 18:24:26 +0900 |
commit | f36d32064cc1aa9997c528e1ae5e73b43f5422ef (patch) | |
tree | fe1c78a28a782691d0ce939089d6a709a9dc72ed | |
parent | 58a22bd5b6d17371493411a7667c8dfcf55d253a (diff) |
kexec: x86_64: use _ALIGN* to make the logic clear
By replacing all the explicit align opertion with marco _ALIGN*,
the code logic could be more clear.
Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r-- | kexec/arch/x86_64/kexec-bzImage64.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kexec/arch/x86_64/kexec-bzImage64.c b/kexec/arch/x86_64/kexec-bzImage64.c index 1496573..86e6d13 100644 --- a/kexec/arch/x86_64/kexec-bzImage64.c +++ b/kexec/arch/x86_64/kexec-bzImage64.c @@ -197,7 +197,7 @@ static int do_bzImage64_load(struct kexec_info *info, k_size = kernel_len - kern16_size; /* need to use run-time size for buffer searching */ dbgprintf("kernel init_size 0x%x\n", real_mode->init_size); - size = (real_mode->init_size + (4096 - 1)) & ~(4096 - 1); + size = _ALIGN(real_mode->init_size, 4096); align = real_mode->kernel_alignment; addr = add_buffer(info, kernel + kern16_size, k_size, size, align, 0x100000, -1, -1); |