Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 158656
b: refs/heads/master
c: 53f8245
h: refs/heads/master
v: v3
  • Loading branch information
Jeremy Fitzhardinge authored and Ingo Molnar committed Sep 4, 2009
1 parent 8baec64 commit 935b167
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1ea0d14e480c245683927eecc03a70faf06e80c8
refs/heads/master: 53f824520b6d84ca5b4a8fd71addc91dbf64357e
2 changes: 1 addition & 1 deletion trunk/arch/x86/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ struct stack_canary {
char __pad[20]; /* canary at %gs:20 */
unsigned long canary;
};
DECLARE_PER_CPU(struct stack_canary, stack_canary) ____cacheline_aligned;
DECLARE_PER_CPU_ALIGNED(struct stack_canary, stack_canary);
#endif
#endif /* X86_64 */

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/kernel/cpu/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,7 @@ DEFINE_PER_CPU(struct orig_ist, orig_ist);
#else /* CONFIG_X86_64 */

#ifdef CONFIG_CC_STACKPROTECTOR
DEFINE_PER_CPU(struct stack_canary, stack_canary) ____cacheline_aligned;
DEFINE_PER_CPU_ALIGNED(struct stack_canary, stack_canary);
#endif

/* Make sure %fs and %gs are initialized properly in idle threads */
Expand Down
3 changes: 3 additions & 0 deletions trunk/include/asm-generic/percpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,17 @@ extern void setup_per_cpu_areas(void);

#ifdef MODULE
#define PER_CPU_SHARED_ALIGNED_SECTION ""
#define PER_CPU_ALIGNED_SECTION ""
#else
#define PER_CPU_SHARED_ALIGNED_SECTION ".shared_aligned"
#define PER_CPU_ALIGNED_SECTION ".shared_aligned"
#endif
#define PER_CPU_FIRST_SECTION ".first"

#else

#define PER_CPU_SHARED_ALIGNED_SECTION ""
#define PER_CPU_ALIGNED_SECTION ".shared_aligned"
#define PER_CPU_FIRST_SECTION ""

#endif
Expand Down
8 changes: 8 additions & 0 deletions trunk/include/linux/percpu-defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@
DEFINE_PER_CPU_SECTION(type, name, PER_CPU_SHARED_ALIGNED_SECTION) \
____cacheline_aligned_in_smp

#define DECLARE_PER_CPU_ALIGNED(type, name) \
DECLARE_PER_CPU_SECTION(type, name, PER_CPU_ALIGNED_SECTION) \
____cacheline_aligned

#define DEFINE_PER_CPU_ALIGNED(type, name) \
DEFINE_PER_CPU_SECTION(type, name, PER_CPU_ALIGNED_SECTION) \
____cacheline_aligned

/*
* Declaration/definition used for per-CPU variables that must be page aligned.
*/
Expand Down

0 comments on commit 935b167

Please sign in to comment.