diff options
Diffstat (limited to 'include/linux/cache.h')
-rw-r--r-- | include/linux/cache.h | 17 |
1 files changed, 13 insertions, 4 deletions
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 | ||