blob: d2818559e26ff405eee1314dcee41e783c0c3576 [file] [log] [blame]
The Android Open Source Project1dc9e472009-03-03 19:28:35 -08001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 ****************************************************************************
11 ****************************************************************************/
12#ifndef __LINUX_CACHE_H
13#define __LINUX_CACHE_H
Ben Cheng4b29af02012-03-07 16:14:53 -080014
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080015#include <linux/kernel.h>
16#include <asm/cache.h>
Ben Cheng4b29af02012-03-07 16:14:53 -080017
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080018#ifndef L1_CACHE_ALIGN
19#define L1_CACHE_ALIGN(x) ALIGN(x, L1_CACHE_BYTES)
20#endif
Ben Cheng4b29af02012-03-07 16:14:53 -080021
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080022#ifndef SMP_CACHE_BYTES
23#define SMP_CACHE_BYTES L1_CACHE_BYTES
24#endif
Ben Cheng4b29af02012-03-07 16:14:53 -080025
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080026#ifndef __read_mostly
27#define __read_mostly
28#endif
Ben Cheng4b29af02012-03-07 16:14:53 -080029
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080030#ifndef ____cacheline_aligned
31#define ____cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES)))
32#endif
Ben Cheng4b29af02012-03-07 16:14:53 -080033
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080034#ifndef ____cacheline_aligned_in_smp
35#define ____cacheline_aligned_in_smp
36#endif
Ben Cheng4b29af02012-03-07 16:14:53 -080037
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080038#ifndef __cacheline_aligned
39#define __cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES), __section__(".data.cacheline_aligned")))
40#endif
Ben Cheng4b29af02012-03-07 16:14:53 -080041
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080042#ifndef __cacheline_aligned_in_smp
43#define __cacheline_aligned_in_smp
44#endif
Ben Cheng4b29af02012-03-07 16:14:53 -080045
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080046#ifndef INTERNODE_CACHE_SHIFT
47#define INTERNODE_CACHE_SHIFT L1_CACHE_SHIFT
48#endif
Ben Cheng4b29af02012-03-07 16:14:53 -080049
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080050#ifndef ____cacheline_internodealigned_in_smp
51#define ____cacheline_internodealigned_in_smp
52#endif
Ben Cheng4b29af02012-03-07 16:14:53 -080053
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080054#endif