]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - kernel/futex.c
Merge branch 'akpm-current/current'
[karo-tx-linux.git] / kernel / futex.c
index 843b552ddd75264b02dcc87c662498482b47c0c8..470c06c3299a7feb5cc0598508715e453274c677 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.
@@ -267,10 +276,10 @@ static struct futex_hash_bucket *futex_queues;
 static struct {
        struct fault_attr attr;
 
-       u32 ignore_private;
+       bool ignore_private;
 } fail_futex = {
        .attr = FAULT_ATTR_INITIALIZER,
-       .ignore_private = 0,
+       .ignore_private = false,
 };
 
 static int __init setup_fail_futex(char *str)