diff -Naur linux-2.5.30-clean/include/linux/cache.h linux-2.5.30/include/linux/cache.h --- linux-2.5.30-clean/include/linux/cache.h Thu Aug 1 16:17:32 2002 +++ linux-2.5.30/include/linux/cache.h Sat Aug 10 06:02:07 2002 @@ -4,12 +4,26 @@ #include #include +#ifndef L1_CACHE_MASK +#define L1_CACHE_MASK (L1_CACHE_BYTES - 1UL) +#endif + #define ALIGN(x,a) (((x)+(a)-1)&~((a)-1)) #ifndef L1_CACHE_ALIGN #define L1_CACHE_ALIGN(x) ALIGN(x, L1_CACHE_BYTES) #endif +/* Return the start of the cache line for address _p */ +#ifndef L1_CACHE_LINE +#define L1_CACHE_LINE(_p) ((unsigned long)(_p) & ~L1_CACHE_MASK) +#endif + +/* Is address _p aligned on a cache boundary? */ +#ifndef L1_CACHE_ALIGNED +#define L1_CACHE_ALIGNED(_p) (((unsigned long)(_p) & L1_CACHE_MASK) == 0) +#endif + #ifndef SMP_CACHE_BYTES #define SMP_CACHE_BYTES L1_CACHE_BYTES #endif