X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=include%2Flinux%2Fcache.h;h=4552504c02289239953aab738adede76c8da20f3;hb=5ab24c79af5a05659f68eae3e5f232c9a15359d7;hp=0b7ecf3af78a70a854cefbac1d7e814a5000baf5;hpb=0356dbb7fe87ba59558902e536d9f960e87353c1;p=linux-2.6-omap-h63xx.git diff --git a/include/linux/cache.h b/include/linux/cache.h index 0b7ecf3af78..4552504c022 100644 --- a/include/linux/cache.h +++ b/include/linux/cache.h @@ -2,7 +2,6 @@ #define __LINUX_CACHE_H #include -#include #include #ifndef L1_CACHE_ALIGN @@ -13,9 +12,7 @@ #define SMP_CACHE_BYTES L1_CACHE_BYTES #endif -#if defined(CONFIG_X86) || defined(CONFIG_SPARC64) || defined(CONFIG_IA64) -#define __read_mostly __attribute__((__section__(".data.read_mostly"))) -#else +#ifndef __read_mostly #define __read_mostly #endif @@ -45,12 +42,21 @@ #endif /* CONFIG_SMP */ #endif -#if !defined(____cacheline_maxaligned_in_smp) +/* + * The maximum alignment needed for some critical structures + * These could be inter-node cacheline sizes/L3 cacheline + * size etc. Define this in asm/cache.h for your arch + */ +#ifndef INTERNODE_CACHE_SHIFT +#define INTERNODE_CACHE_SHIFT L1_CACHE_SHIFT +#endif + +#if !defined(____cacheline_internodealigned_in_smp) #if defined(CONFIG_SMP) -#define ____cacheline_maxaligned_in_smp \ - __attribute__((__aligned__(1 << (L1_CACHE_SHIFT_MAX)))) +#define ____cacheline_internodealigned_in_smp \ + __attribute__((__aligned__(1 << (INTERNODE_CACHE_SHIFT)))) #else -#define ____cacheline_maxaligned_in_smp +#define ____cacheline_internodealigned_in_smp #endif #endif