blob: 48f99f15452e7d111e8bad21a4830d21231071cc [file] [log] [blame]
H. Peter Anvin1965aae2008-10-22 22:26:29 -07001#ifndef _ASM_X86_CACHE_H
2#define _ASM_X86_CACHE_H
Thomas Gleixner9bfa23d2007-10-15 23:28:20 +02003
Tim Abbottabe1ee32009-09-20 18:14:15 -04004#include <linux/linkage.h>
5
Thomas Gleixner9bfa23d2007-10-15 23:28:20 +02006/* L1 cache line size */
7#define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT)
8#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
9
Denys Vlasenko54cb27a2010-02-20 01:03:44 +010010#define __read_mostly __attribute__((__section__(".data..read_mostly")))
Thomas Gleixner9bfa23d2007-10-15 23:28:20 +020011
Jan Beulich350f8f52009-11-13 11:54:40 +000012#define INTERNODE_CACHE_SHIFT CONFIG_X86_INTERNODE_CACHE_SHIFT
13#define INTERNODE_CACHE_BYTES (1 << INTERNODE_CACHE_SHIFT)
14
Thomas Gleixner9bfa23d2007-10-15 23:28:20 +020015#ifdef CONFIG_X86_VSMP
Thomas Gleixner9bfa23d2007-10-15 23:28:20 +020016#ifdef CONFIG_SMP
17#define __cacheline_aligned_in_smp \
Jan Beulich350f8f52009-11-13 11:54:40 +000018 __attribute__((__aligned__(INTERNODE_CACHE_BYTES))) \
Tim Abbottabe1ee32009-09-20 18:14:15 -040019 __page_aligned_data
Thomas Gleixner9bfa23d2007-10-15 23:28:20 +020020#endif
21#endif
22
H. Peter Anvin1965aae2008-10-22 22:26:29 -070023#endif /* _ASM_X86_CACHE_H */