From: "H. Peter Anvin" <hpa@zytor.com>
To: Qiaowei Ren <qiaowei.ren@intel.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] x86: add user_atomic_cmpxchg_inatomic at uaccess.h
Date: Mon, 16 Dec 2013 08:55:19 -0800 [thread overview]
Message-ID: <52AF3077.1060001@zytor.com> (raw)
In-Reply-To: <1387002303-6620-1-git-send-email-qiaowei.ren@intel.com>
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
next prev parent reply other threads:[~2013-12-16 16:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-14 6:25 [PATCH 1/2] x86: add user_atomic_cmpxchg_inatomic at uaccess.h Qiaowei Ren
2013-12-14 6:25 ` [PATCH 2/2] x86: replace futex_atomic_cmpxchg_inatomic() with user_atomic_cmpxchg_inatomic Qiaowei Ren
2013-12-16 17:24 ` [tip:x86/mpx] " tip-bot for Qiaowei Ren
2013-12-16 12:21 ` [PATCH 1/2] x86: add user_atomic_cmpxchg_inatomic at uaccess.h Ren, Qiaowei
2013-12-16 16:55 ` H. Peter Anvin [this message]
2013-12-16 17:24 ` [tip:x86/mpx] " tip-bot for Qiaowei Ren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52AF3077.1060001@zytor.com \
--to=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=qiaowei.ren@intel.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox