From d8b30df5483ff382d080846c6948e11f60ff40e0 Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Mon, 28 Apr 2008 02:12:22 -0700 Subject: [PATCH] --- yaml --- r: 93988 b: refs/heads/master c: 1b27d05b6e21249d2338be26dfcbe8f8d8ff8a5b h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/x86/Kconfig | 3 +++ trunk/include/linux/cache.h | 4 ++++ trunk/mm/slab.c | 4 ---- trunk/mm/slub.c | 5 ----- 5 files changed, 8 insertions(+), 10 deletions(-) diff --git a/[refs] b/[refs] index 2e19193c4492..005c9dee5305 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 19fc3f0acde32636529969570055c7e2a744787c +refs/heads/master: 1b27d05b6e21249d2338be26dfcbe8f8d8ff8a5b diff --git a/trunk/arch/x86/Kconfig b/trunk/arch/x86/Kconfig index e5790fe9e330..a8ce13a54764 100644 --- a/trunk/arch/x86/Kconfig +++ b/trunk/arch/x86/Kconfig @@ -114,6 +114,9 @@ config GENERIC_TIME_VSYSCALL config ARCH_HAS_CPU_RELAX def_bool y +config ARCH_HAS_CACHE_LINE_SIZE + def_bool y + config HAVE_SETUP_PER_CPU_AREA def_bool X86_64 || (X86_SMP && !X86_VOYAGER) diff --git a/trunk/include/linux/cache.h b/trunk/include/linux/cache.h index 4552504c0228..97e24881c4c6 100644 --- a/trunk/include/linux/cache.h +++ b/trunk/include/linux/cache.h @@ -60,4 +60,8 @@ #endif #endif +#ifndef CONFIG_ARCH_HAS_CACHE_LINE_SIZE +#define cache_line_size() L1_CACHE_BYTES +#endif + #endif /* __LINUX_CACHE_H */ diff --git a/trunk/mm/slab.c b/trunk/mm/slab.c index 7bc4a136846e..39d20f8a0791 100644 --- a/trunk/mm/slab.c +++ b/trunk/mm/slab.c @@ -139,10 +139,6 @@ #define BYTES_PER_WORD sizeof(void *) #define REDZONE_ALIGN max(BYTES_PER_WORD, __alignof__(unsigned long long)) -#ifndef cache_line_size -#define cache_line_size() L1_CACHE_BYTES -#endif - #ifndef ARCH_KMALLOC_MINALIGN /* * Enforce a minimum alignment for the kmalloc caches. diff --git a/trunk/mm/slub.c b/trunk/mm/slub.c index 48fff83a1e9d..38914bc64aca 100644 --- a/trunk/mm/slub.c +++ b/trunk/mm/slub.c @@ -207,11 +207,6 @@ static inline void ClearSlabDebug(struct page *page) #define __KMALLOC_CACHE 0x20000000 /* objects freed using kfree */ #define __PAGE_ALLOC_FALLBACK 0x10000000 /* Allow fallback to page alloc */ -/* Not all arches define cache_line_size */ -#ifndef cache_line_size -#define cache_line_size() L1_CACHE_BYTES -#endif - static int kmem_size = sizeof(struct kmem_cache); #ifdef CONFIG_SMP