Re: [PATCH] ia64: populate the cmpxchg header with appropriate code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Sparc Linux]     [DCCP]     [Linux ARM]     [Yosemite News]     [Linux SCSI]     [Linux x86_64]     [Linux for Ham Radio]

  Powered by Linux