[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <52AF3077.1060001@zytor.com>
Date: Mon, 16 Dec 2013 08:55:19 -0800
From: "H. Peter Anvin" <hpa@...or.com>
To: Qiaowei Ren <qiaowei.ren@...el.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>
CC: x86@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] x86: add user_atomic_cmpxchg_inatomic at uaccess.h
On 12/13/2013 10:25 PM, Qiaowei Ren wrote:
> +#ifdef CONFIG_X86_64 \
> + case 8: \
> + { \
> + asm volatile("\t" ASM_STAC "\n" \
> + "1:\t" LOCK_PREFIX "cmpxchgq %4, %2\n" \
> + "2:\t" ASM_CLAC "\n" \
> + "\t.section .fixup, \"ax\"\n" \
> + "3:\tmov %3, %0\n" \
> + "\tjmp 2b\n" \
> + "\t.previous\n" \
> + _ASM_EXTABLE(1b, 3b) \
> + : "+r" (__ret), "=a" (__old), "+m" (*(ptr)) \
> + : "i" (-EFAULT), "r" (__new), "1" (__old) \
> + : "memory" \
> + ); \
> + break; \
> + } \
> +#endif \
This, of course, doesn't work because this is embedded in a macro. I
realize I requested it, but you should still have tested it.
Anyway, I'll fix it up.
-hpa
--
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