|
@@ -2844,6 +2844,7 @@ SYSCALL_DEFINE6(futex, u32 __user *, uaddr, int, op, u32, val,
|
|
|
static int __init futex_init(void)
|
|
|
{
|
|
|
u32 curval;
|
|
|
+ unsigned int futex_shift;
|
|
|
unsigned long i;
|
|
|
|
|
|
#if CONFIG_BASE_SMALL
|
|
@@ -2855,8 +2856,9 @@ static int __init futex_init(void)
|
|
|
futex_queues = alloc_large_system_hash("futex", sizeof(*futex_queues),
|
|
|
futex_hashsize, 0,
|
|
|
futex_hashsize < 256 ? HASH_SMALL : 0,
|
|
|
- NULL, NULL, futex_hashsize, futex_hashsize);
|
|
|
-
|
|
|
+ &futex_shift, NULL,
|
|
|
+ futex_hashsize, futex_hashsize);
|
|
|
+ futex_hashsize = 1UL << futex_shift;
|
|
|
/*
|
|
|
* This will fail and we want it. Some arch implementations do
|
|
|
* runtime detection of the futex_atomic_cmpxchg_inatomic()
|