diff options
| author | Ingo Molnar <mingo@kernel.org> | 2016-03-21 10:47:40 +0100 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2016-03-21 10:47:40 +0100 |
| commit | 42e405f7b1d252c90a2468dd2140f47b8142b7a0 (patch) | |
| tree | baeda52d8726fe694d3344a0d0fda1dadc30a901 /include/linux/cache.h | |
| parent | e9532e69b8d1d1284e8ecf8d2586de34aec61244 (diff) | |
| parent | 710d60cbf1b312a8075a2158cbfbbd9c66132dcc (diff) | |
| download | lwn-42e405f7b1d252c90a2468dd2140f47b8142b7a0.tar.gz lwn-42e405f7b1d252c90a2468dd2140f47b8142b7a0.zip | |
Merge branch 'linus' into sched/urgent, to pick up dependencies
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/cache.h')
| -rw-r--r-- | include/linux/cache.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/cache.h b/include/linux/cache.h index 17e7e82d2aa7..1be04f8c563a 100644 --- a/include/linux/cache.h +++ b/include/linux/cache.h @@ -12,10 +12,24 @@ #define SMP_CACHE_BYTES L1_CACHE_BYTES #endif +/* + * __read_mostly is used to keep rarely changing variables out of frequently + * updated cachelines. If an architecture doesn't support it, ignore the + * hint. + */ #ifndef __read_mostly #define __read_mostly #endif +/* + * __ro_after_init is used to mark things that are read-only after init (i.e. + * after mark_rodata_ro() has been called). These are effectively read-only, + * but may get written to during init, so can't live in .rodata (via "const"). + */ +#ifndef __ro_after_init +#define __ro_after_init __attribute__((__section__(".data..ro_after_init"))) +#endif + #ifndef ____cacheline_aligned #define ____cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES))) #endif |
