]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - kernel/futex.c
Merge remote-tracking branch 'driver-core/driver-core-next'
[karo-tx-linux.git] / kernel / futex.c
index 395b967841b4af2870b63892b97b920fac2eb015..684d7549825a4300ced2002a3fbec0a5698a18d1 100644 (file)
@@ -255,9 +255,18 @@ struct futex_hash_bucket {
        struct plist_head chain;
 } ____cacheline_aligned_in_smp;
 
-static unsigned long __read_mostly futex_hashsize;
+/*
+ * The base of the bucket array and its size are always used together
+ * (after initialization only in hash_futex()), so ensure that they
+ * reside in the same cacheline.
+ */
+static struct {
+       struct futex_hash_bucket *queues;
+       unsigned long            hashsize;
+} __futex_data __read_mostly __aligned(2*sizeof(long));
+#define futex_queues   (__futex_data.queues)
+#define futex_hashsize (__futex_data.hashsize)
 
-static struct futex_hash_bucket *futex_queues;
 
 /*
  * Fault injections for futexes.