aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2018-03-15 06:49:36 -0400
committerIngo Molnar <mingo@kernel.org>2018-03-20 03:23:25 -0400
commitb3fc5c9bb373661224906bf434c09ca0de032e82 (patch)
treea93c79001c75d325e20d6325a1838b6f00510674
parent9b8cce52c4b5c08297900bfdcafc6b08d9bc4a27 (diff)
sched/wait: Improve __var_waitqueue() code generation
Since we fixed hash_64() to not suck there is no need to play games to attempt to improve the hash value on 64-bit. Also, since we don't use the bit value for the variables, use hash_ptr() directly. No change in functionality. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: George Spelvin <linux@sciencehorizons.net> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r--kernel/sched/wait_bit.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/kernel/sched/wait_bit.c b/kernel/sched/wait_bit.c
index 60a84f5a6cb4..c67c6d24adc2 100644
--- a/kernel/sched/wait_bit.c
+++ b/kernel/sched/wait_bit.c
@@ -151,12 +151,7 @@ EXPORT_SYMBOL(wake_up_bit);
151 151
152wait_queue_head_t *__var_waitqueue(void *p) 152wait_queue_head_t *__var_waitqueue(void *p)
153{ 153{
154 if (BITS_PER_LONG == 64) { 154 return bit_wait_table + hash_ptr(p, WAIT_TABLE_BITS);
155 unsigned long q = (unsigned long)p;
156
157 return bit_waitqueue((void *)(q & ~1), q & 1);
158 }
159 return bit_waitqueue(p, 0);
160} 155}
161EXPORT_SYMBOL(__var_waitqueue); 156EXPORT_SYMBOL(__var_waitqueue);
162 157