diff options
author | Chris Metcalf <cmetcalf@tilera.com> | 2013-08-15 16:29:02 -0400 |
---|---|---|
committer | Chris Metcalf <cmetcalf@tilera.com> | 2013-09-03 14:53:32 -0400 |
commit | ce61cdc270a5e0dd18057bbf29bd3471abccbda8 (patch) | |
tree | 354d229299b6b02d98f40e5c650e6ddbc3411b7b /arch/tile/include | |
parent | d7c9661115fd23b4dabb710b3080dd9919dfa891 (diff) |
tile: make __write_once a synonym for __read_mostly
This was really only useful for TILE64 when we mapped the
kernel data with small pages. Now we use a huge page and we
really don't want to map different parts of the kernel
data in different ways.
We retain the __write_once name in case we want to bring
it back to life at some point in the future.
Note that this change uncovered a latent bug where the
"smp_topology" variable happened to always be aligned mod 8
so we could store two "int" values at once, but when we
eliminated __write_once it ended up only aligned mod 4.
Fix with an explicit annotation.
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Diffstat (limited to 'arch/tile/include')
-rw-r--r-- | arch/tile/include/asm/cache.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/arch/tile/include/asm/cache.h b/arch/tile/include/asm/cache.h index a9a529964e07..6160761d5f61 100644 --- a/arch/tile/include/asm/cache.h +++ b/arch/tile/include/asm/cache.h | |||
@@ -49,9 +49,16 @@ | |||
49 | #define __read_mostly __attribute__((__section__(".data..read_mostly"))) | 49 | #define __read_mostly __attribute__((__section__(".data..read_mostly"))) |
50 | 50 | ||
51 | /* | 51 | /* |
52 | * Attribute for data that is kept read/write coherent until the end of | 52 | * Originally we used small TLB pages for kernel data and grouped some |
53 | * initialization, then bumped to read/only incoherent for performance. | 53 | * things together as "write once", enforcing the property at the end |
54 | * of initialization by making those pages read-only and non-coherent. | ||
55 | * This allowed better cache utilization since cache inclusion did not | ||
56 | * need to be maintained. However, to do this requires an extra TLB | ||
57 | * entry, which on balance is more of a performance hit than the | ||
58 | * non-coherence is a performance gain, so we now just make "read | ||
59 | * mostly" and "write once" be synonyms. We keep the attribute | ||
60 | * separate in case we change our minds at a future date. | ||
54 | */ | 61 | */ |
55 | #define __write_once __attribute__((__section__(".w1data"))) | 62 | #define __write_once __read_mostly |
56 | 63 | ||
57 | #endif /* _ASM_TILE_CACHE_H */ | 64 | #endif /* _ASM_TILE_CACHE_H */ |