aboutsummaryrefslogtreecommitdiffstats
path: root/arch/tile/kernel/smp.c
diff options
context:
space:
mode:
authorChris Metcalf <cmetcalf@tilera.com>2013-08-15 16:29:02 -0400
committerChris Metcalf <cmetcalf@tilera.com>2013-09-03 14:53:32 -0400
commitce61cdc270a5e0dd18057bbf29bd3471abccbda8 (patch)
tree354d229299b6b02d98f40e5c650e6ddbc3411b7b /arch/tile/kernel/smp.c
parenttile: remove support for TILE64 (diff)
downloadlinux-dev-ce61cdc270a5e0dd18057bbf29bd3471abccbda8.tar.xz
linux-dev-ce61cdc270a5e0dd18057bbf29bd3471abccbda8.zip
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/kernel/smp.c')
-rw-r--r--arch/tile/kernel/smp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/tile/kernel/smp.c b/arch/tile/kernel/smp.c
index 0ae1c594d883..01e8ab29f43a 100644
--- a/arch/tile/kernel/smp.c
+++ b/arch/tile/kernel/smp.c
@@ -22,7 +22,11 @@
#include <asm/cacheflush.h>
#include <asm/homecache.h>
-HV_Topology smp_topology __write_once;
+/*
+ * We write to width and height with a single store in head_NN.S,
+ * so make the variable aligned to "long".
+ */
+HV_Topology smp_topology __write_once __aligned(sizeof(long));
EXPORT_SYMBOL(smp_topology);
#if CHIP_HAS_IPI()