[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+8MBb+LEqcyGQ+qfmnqzmPEtHeOf=XoR4rtpW9Rz74zU80Mkw@mail.gmail.com>
Date: Thu, 12 Apr 2012 14:52:48 -0700
From: Tony Luck <tony.luck@...el.com>
To: Émeric Maschino <emeric.maschino@...il.com>
Cc: Paul Gortmaker <paul.gortmaker@...driver.com>,
linux-ia64@...r.kernel.org, linux-kernel@...r.kernel.org,
Fenghua Yu <fenghua.yu@...el.com>,
David Howells <dhowells@...hat.com>,
Michel Lespinasse <walken@...gle.com>
Subject: Re: [PATCH] ia64: populate the cmpxchg header with appropriate code
I think that problem with the futex change is not with the ia64 inline
parts ... but
with the code that decides whether to enable them. Try this
(white-space damaged,
but not intended for prime-time) patch:
diff --git a/kernel/futex.c b/kernel/futex.c
index e2b0fb9..9a00bf8 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -2722,7 +2722,9 @@ static int __init futex_init(void)
* implementation, the non-functional ones will return
* -ENOSYS.
*/
+#ifndef CONFIG_IA64
if (cmpxchg_futex_value_locked(&curval, NULL, 0, 0) == -EFAULT)
+#endif
futex_cmpxchg_enabled = 1;
for (i = 0; i < ARRAY_SIZE(futex_queues); i++) {
IA64 doesn't return a -EFAULT when we poke at the supposedly invalid user
address of "NULL" because we map a special page to catch prefetch references
so that loops like "for (p = something; p != NULL; p = p->next) { use
p->field }" don't
do unpleasant thinks when the pre-fetcher dereferences the NULL "p".
This patch enables the futexttest suite to run ... perhaps it will help
with the other problems too?
-Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists