From: Andi Kleen <ak@muc.de>
To: "Kaigai Kohei" <kaigai@ak.jp.nec.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH]atomic_inc_return() for i386/x86_64 (Re: RCU issue with SELinux)
Date: Sat, 28 Aug 2004 16:48:13 +0200 [thread overview]
Message-ID: <m3k6vjco9e.fsf@averell.firstfloor.org> (raw)
In-Reply-To: <2x2JC-3Uu-11@gated-at.bofh.it> (Kaigai Kohei's message of "Wed, 25 Aug 2004 12:00:12 +0200")
"Kaigai Kohei" <kaigai@ak.jp.nec.com> writes:
> atomic_inc_return() is not defined for arm,arm26,i386,x86_64 and um archtectures.
> This attached patch adds atomic_inc_return() and atomic_dec_return() to arm,i386 and x86_64.
>
> It is implemented by 'xaddl' operation with LOCK prefix for i386 and x86_64.
> But this operation is permitted after i486 processor only.
> Another implementation may be necessary for i386SX/DX processor.
> But 'xaddl' operation is used in 'include/asm-i386/rwsem.h' unconditionally.
> I think it has agreed on using 'xaddl' operation in past days.
We don't support SMP on 386 boxes. What you can do for 386 is to use
alternative() and just use an non SMP safe version for 386 and xadd
for 486+
This will require adding a new pseudo CPUID bit in cpufeature.h
that can be tested for in alternative (similar to the X86_FEATURE_P3/P4
flags that are already there)
-Andi
next parent reply other threads:[~2004-08-28 14:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <2wJxj-7g2-23@gated-at.bofh.it>
[not found] ` <2x2JC-3Uu-11@gated-at.bofh.it>
2004-08-28 14:48 ` Andi Kleen [this message]
2004-08-31 8:19 ` [PATCH]atomic_inc_return() for i386/x86_64 (Re: RCU issue with SELinux) Kaigai Kohei
2004-08-31 8:49 ` Andi Kleen
2004-09-01 6:22 ` Kaigai Kohei
2004-08-24 13:24 RCU issue with SELinux (Re: SELINUX performance issues) James Morris
2004-08-25 9:52 ` [PATCH]atomic_inc_return() for i386/x86_64 (Re: RCU issue with SELinux) Kaigai Kohei
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=m3k6vjco9e.fsf@averell.firstfloor.org \
--to=ak@muc.de \
--cc=kaigai@ak.jp.nec.com \
--cc=linux-kernel@vger.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