diff options
-rw-r--r-- | arch/i386/kernel/init_task.c | 2 | ||||
-rw-r--r-- | arch/i386/kernel/irq.c | 2 | ||||
-rw-r--r-- | arch/x86_64/kernel/init_task.c | 2 | ||||
-rw-r--r-- | include/linux/cache.h | 17 | ||||
-rw-r--r-- | include/linux/ide.h | 2 | ||||
-rw-r--r-- | include/linux/mmzone.h | 4 | ||||
-rw-r--r-- | include/linux/rcupdate.h | 2 | ||||
-rw-r--r-- | kernel/rcupdate.c | 4 | ||||
-rw-r--r-- | mm/sparse.c | 4 |
9 files changed, 24 insertions, 15 deletions
diff --git a/arch/i386/kernel/init_task.c b/arch/i386/kernel/init_task.c index 9caa8e8db80c..cff95d10a4d8 100644 --- a/arch/i386/kernel/init_task.c +++ b/arch/i386/kernel/init_task.c | |||
@@ -42,5 +42,5 @@ EXPORT_SYMBOL(init_task); | |||
42 | * per-CPU TSS segments. Threads are completely 'soft' on Linux, | 42 | * per-CPU TSS segments. Threads are completely 'soft' on Linux, |
43 | * no more per-task TSS's. | 43 | * no more per-task TSS's. |
44 | */ | 44 | */ |
45 | DEFINE_PER_CPU(struct tss_struct, init_tss) ____cacheline_maxaligned_in_smp = INIT_TSS; | 45 | DEFINE_PER_CPU(struct tss_struct, init_tss) ____cacheline_internodealigned_in_smp = INIT_TSS; |
46 | 46 | ||
diff --git a/arch/i386/kernel/irq.c b/arch/i386/kernel/irq.c index 1a201a932865..f3a9c78c4a24 100644 --- a/arch/i386/kernel/irq.c +++ b/arch/i386/kernel/irq.c | |||
@@ -19,7 +19,7 @@ | |||
19 | #include <linux/cpu.h> | 19 | #include <linux/cpu.h> |
20 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
21 | 21 | ||
22 | DEFINE_PER_CPU(irq_cpustat_t, irq_stat) ____cacheline_maxaligned_in_smp; | 22 | DEFINE_PER_CPU(irq_cpustat_t, irq_stat) ____cacheline_internodealigned_in_smp; |
23 | EXPORT_PER_CPU_SYMBOL(irq_stat); | 23 | EXPORT_PER_CPU_SYMBOL(irq_stat); |
24 | 24 | ||
25 | #ifndef CONFIG_X86_LOCAL_APIC | 25 | #ifndef CONFIG_X86_LOCAL_APIC |
diff --git a/arch/x86_64/kernel/init_task.c b/arch/x86_64/kernel/init_task.c index e0ba5c1043fd..ce31d904d601 100644 --- a/arch/x86_64/kernel/init_task.c +++ b/arch/x86_64/kernel/init_task.c | |||
@@ -44,6 +44,6 @@ EXPORT_SYMBOL(init_task); | |||
44 | * section. Since TSS's are completely CPU-local, we want them | 44 | * section. Since TSS's are completely CPU-local, we want them |
45 | * on exact cacheline boundaries, to eliminate cacheline ping-pong. | 45 | * on exact cacheline boundaries, to eliminate cacheline ping-pong. |
46 | */ | 46 | */ |
47 | DEFINE_PER_CPU(struct tss_struct, init_tss) ____cacheline_maxaligned_in_smp = INIT_TSS; | 47 | DEFINE_PER_CPU(struct tss_struct, init_tss) ____cacheline_internodealigned_in_smp = INIT_TSS; |
48 | 48 | ||
49 | #define ALIGN_TO_4K __attribute__((section(".data.init_task"))) | 49 | #define ALIGN_TO_4K __attribute__((section(".data.init_task"))) |
diff --git a/include/linux/cache.h b/include/linux/cache.h index 0b7ecf3af78a..ffe52210fc4f 100644 --- a/include/linux/cache.h +++ b/include/linux/cache.h | |||
@@ -45,12 +45,21 @@ | |||
45 | #endif /* CONFIG_SMP */ | 45 | #endif /* CONFIG_SMP */ |
46 | #endif | 46 | #endif |
47 | 47 | ||
48 | #if !defined(____cacheline_maxaligned_in_smp) | 48 | /* |
49 | * The maximum alignment needed for some critical structures | ||
50 | * These could be inter-node cacheline sizes/L3 cacheline | ||
51 | * size etc. Define this in asm/cache.h for your arch | ||
52 | */ | ||
53 | #ifndef INTERNODE_CACHE_SHIFT | ||
54 | #define INTERNODE_CACHE_SHIFT L1_CACHE_SHIFT | ||
55 | #endif | ||
56 | |||
57 | #if !defined(____cacheline_internodealigned_in_smp) | ||
49 | #if defined(CONFIG_SMP) | 58 | #if defined(CONFIG_SMP) |
50 | #define ____cacheline_maxaligned_in_smp \ | 59 | #define ____cacheline_internodealigned_in_smp \ |
51 | __attribute__((__aligned__(1 << (L1_CACHE_SHIFT_MAX)))) | 60 | __attribute__((__aligned__(1 << (INTERNODE_CACHE_SHIFT)))) |
52 | #else | 61 | #else |
53 | #define ____cacheline_maxaligned_in_smp | 62 | #define ____cacheline_internodealigned_in_smp |
54 | #endif | 63 | #endif |
55 | #endif | 64 | #endif |
56 | 65 | ||
diff --git a/include/linux/ide.h b/include/linux/ide.h index 7b6a6a58e465..4dd6694963c0 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -801,7 +801,7 @@ typedef struct hwif_s { | |||
801 | unsigned dma; | 801 | unsigned dma; |
802 | 802 | ||
803 | void (*led_act)(void *data, int rw); | 803 | void (*led_act)(void *data, int rw); |
804 | } ____cacheline_maxaligned_in_smp ide_hwif_t; | 804 | } ____cacheline_internodealigned_in_smp ide_hwif_t; |
805 | 805 | ||
806 | /* | 806 | /* |
807 | * internal ide interrupt handler type | 807 | * internal ide interrupt handler type |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 2a89c132ba9c..7e4ae6ab1977 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -38,7 +38,7 @@ struct pglist_data; | |||
38 | #if defined(CONFIG_SMP) | 38 | #if defined(CONFIG_SMP) |
39 | struct zone_padding { | 39 | struct zone_padding { |
40 | char x[0]; | 40 | char x[0]; |
41 | } ____cacheline_maxaligned_in_smp; | 41 | } ____cacheline_internodealigned_in_smp; |
42 | #define ZONE_PADDING(name) struct zone_padding name; | 42 | #define ZONE_PADDING(name) struct zone_padding name; |
43 | #else | 43 | #else |
44 | #define ZONE_PADDING(name) | 44 | #define ZONE_PADDING(name) |
@@ -233,7 +233,7 @@ struct zone { | |||
233 | * rarely used fields: | 233 | * rarely used fields: |
234 | */ | 234 | */ |
235 | char *name; | 235 | char *name; |
236 | } ____cacheline_maxaligned_in_smp; | 236 | } ____cacheline_internodealigned_in_smp; |
237 | 237 | ||
238 | 238 | ||
239 | /* | 239 | /* |
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index a471f3bb713e..51747cd88d1a 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -65,7 +65,7 @@ struct rcu_ctrlblk { | |||
65 | long cur; /* Current batch number. */ | 65 | long cur; /* Current batch number. */ |
66 | long completed; /* Number of the last completed batch */ | 66 | long completed; /* Number of the last completed batch */ |
67 | int next_pending; /* Is the next batch already waiting? */ | 67 | int next_pending; /* Is the next batch already waiting? */ |
68 | } ____cacheline_maxaligned_in_smp; | 68 | } ____cacheline_internodealigned_in_smp; |
69 | 69 | ||
70 | /* Is batch a before batch b ? */ | 70 | /* Is batch a before batch b ? */ |
71 | static inline int rcu_batch_before(long a, long b) | 71 | static inline int rcu_batch_before(long a, long b) |
diff --git a/kernel/rcupdate.c b/kernel/rcupdate.c index 48d3bce465b8..c9afc61240e4 100644 --- a/kernel/rcupdate.c +++ b/kernel/rcupdate.c | |||
@@ -61,9 +61,9 @@ struct rcu_state { | |||
61 | /* for current batch to proceed. */ | 61 | /* for current batch to proceed. */ |
62 | }; | 62 | }; |
63 | 63 | ||
64 | static struct rcu_state rcu_state ____cacheline_maxaligned_in_smp = | 64 | static struct rcu_state rcu_state ____cacheline_internodealigned_in_smp = |
65 | {.lock = SPIN_LOCK_UNLOCKED, .cpumask = CPU_MASK_NONE }; | 65 | {.lock = SPIN_LOCK_UNLOCKED, .cpumask = CPU_MASK_NONE }; |
66 | static struct rcu_state rcu_bh_state ____cacheline_maxaligned_in_smp = | 66 | static struct rcu_state rcu_bh_state ____cacheline_internodealigned_in_smp = |
67 | {.lock = SPIN_LOCK_UNLOCKED, .cpumask = CPU_MASK_NONE }; | 67 | {.lock = SPIN_LOCK_UNLOCKED, .cpumask = CPU_MASK_NONE }; |
68 | 68 | ||
69 | DEFINE_PER_CPU(struct rcu_data, rcu_data) = { 0L }; | 69 | DEFINE_PER_CPU(struct rcu_data, rcu_data) = { 0L }; |
diff --git a/mm/sparse.c b/mm/sparse.c index 72079b538e2d..0a51f36ba3a1 100644 --- a/mm/sparse.c +++ b/mm/sparse.c | |||
@@ -18,10 +18,10 @@ | |||
18 | */ | 18 | */ |
19 | #ifdef CONFIG_SPARSEMEM_EXTREME | 19 | #ifdef CONFIG_SPARSEMEM_EXTREME |
20 | struct mem_section *mem_section[NR_SECTION_ROOTS] | 20 | struct mem_section *mem_section[NR_SECTION_ROOTS] |
21 | ____cacheline_maxaligned_in_smp; | 21 | ____cacheline_internodealigned_in_smp; |
22 | #else | 22 | #else |
23 | struct mem_section mem_section[NR_SECTION_ROOTS][SECTIONS_PER_ROOT] | 23 | struct mem_section mem_section[NR_SECTION_ROOTS][SECTIONS_PER_ROOT] |
24 | ____cacheline_maxaligned_in_smp; | 24 | ____cacheline_internodealigned_in_smp; |
25 | #endif | 25 | #endif |
26 | EXPORT_SYMBOL(mem_section); | 26 | EXPORT_SYMBOL(mem_section); |
27 | 27 | ||