diff options
author | Tejun Heo <tj@kernel.org> | 2009-08-03 01:10:11 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2009-08-03 12:29:24 -0400 |
commit | 3e352aa8ee2bd48f1a19c7742810b3a4a7ba605e (patch) | |
tree | a90566108225efefb1aaedc425b8bdcb72b389df /arch/x86 | |
parent | ed8d9adf357ec331603fa1049510399812cea7e5 (diff) |
x86, percpu: Fix DECLARE/DEFINE_PER_CPU_PAGE_ALIGNED()
DECLARE/DEFINE_PER_CPU_PAGE_ALIGNED() put percpu variables in
.page_aligned section without adding any alignment restrictions.
Currently, this doesn't cause any problem because all users of the
macros have explicit page alignment and page-sized but it's much safer
to enforce page alignment from the macros. After all, it's what they
claim to do.
Add __aligned(PAGE_SIZE) to DECLARE/DEFINE_PER_CPU_PAGE_ALIGNED() and
drop explicit alignment from it users.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/cpu/common.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index f1961c07af9a..12493c5485e5 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c | |||
@@ -1008,8 +1008,7 @@ static const unsigned int exception_stack_sizes[N_EXCEPTION_STACKS] = { | |||
1008 | }; | 1008 | }; |
1009 | 1009 | ||
1010 | static DEFINE_PER_CPU_PAGE_ALIGNED(char, exception_stacks | 1010 | static DEFINE_PER_CPU_PAGE_ALIGNED(char, exception_stacks |
1011 | [(N_EXCEPTION_STACKS - 1) * EXCEPTION_STKSZ + DEBUG_STKSZ]) | 1011 | [(N_EXCEPTION_STACKS - 1) * EXCEPTION_STKSZ + DEBUG_STKSZ]); |
1012 | __aligned(PAGE_SIZE); | ||
1013 | 1012 | ||
1014 | /* May not be marked __init: used by software suspend */ | 1013 | /* May not be marked __init: used by software suspend */ |
1015 | void syscall_init(void) | 1014 | void syscall_init(void) |