From: "H. Peter Anvin" <hpa@zytor.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Borislav Petkov <petkovbb@googlemail.com>,
Borislav Petkov <borislav.petkov@amd.com>,
greg@kroah.com, mingo@elte.hu, norsk5@yahoo.com,
tglx@linutronix.de, mchehab@redhat.com, aris@redhat.com,
edt@aei.ca, linux-kernel@vger.kernel.org,
randy.dunlap@oracle.com
Subject: Re: [PATCH 0/4] amd64_edac: misc fixes
Date: Sat, 30 May 2009 12:22:09 -0700 [thread overview]
Message-ID: <4A218761.5080607@zytor.com> (raw)
In-Reply-To: <20090530014007.3c1e22d5.akpm@linux-foundation.org>
Andrew Morton wrote:
> On Sat, 30 May 2009 10:19:54 +0200 Borislav Petkov <petkovbb@googlemail.com> wrote:
>
>> Also, I've been thinking about how the old(er)
>> toolchain problem can be addressed and one fairly doable thing would be
>> if I'd query the gas version in the kernel Makefile and define popcnt
>> dependent on it and for older assemblers simply slap in the opcode and
>> fixate the operands in an inline assembly so that it works.
>
> We've done that before. BUG() is one case (for other reasons), I think.
>
> But if we have the code in there which uese the literal opcode, there's
> no need to query gas or to add the conditional.
>
> Is popcnt supported on all CPUs?
Obviously not, since it's a relatively new opcode. However, it is
supported by both Intel and AMD with the opcode F3 0F B8 /r.
The "/r" is the real problem ... it means one can't just mimic it with
hard-coding .byte directives without fixing the arguments (which means a
performance hit.) Furthermore, the 0F B8 opcode is JMPE, which doesn't
take the same arguments either.
We have these kinds of toolchain issues regularly.
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
next prev parent reply other threads:[~2009-05-30 19:23 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-20 18:43 [PATCH 0/4] amd64_edac: misc fixes Borislav Petkov
2009-05-20 18:43 ` [PATCH 1/4] x86: msr.h: fix build error Borislav Petkov
2009-05-20 18:43 ` [PATCH 2/4] amd64_edac: do not enable module by default Borislav Petkov
2009-05-20 18:43 ` [PATCH 3/4] EDAC: do not enable modules " Borislav Petkov
2009-05-20 18:43 ` [PATCH 4/4] amd64_edac: add MAINTAINERS entry Borislav Petkov
2009-05-20 21:41 ` [PATCH 0/4] amd64_edac: misc fixes Randy Dunlap
2009-05-28 23:47 ` Andrew Morton
2009-05-29 10:33 ` Borislav Petkov
2009-05-29 20:01 ` Andrew Morton
2009-05-30 8:19 ` Borislav Petkov
2009-05-30 8:40 ` Andrew Morton
2009-05-30 10:31 ` Borislav Petkov
2009-05-30 19:22 ` H. Peter Anvin [this message]
2009-06-01 14:53 ` Borislav Petkov
2009-06-01 16:54 ` H. Peter Anvin
2009-06-01 17:02 ` H. Peter Anvin
2009-06-01 17:31 ` H.J. Lu
2009-06-01 18:12 ` Borislav Petkov
2009-06-01 18:57 ` H. Peter Anvin
2009-06-03 18:20 ` Borislav Petkov
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=4A218761.5080607@zytor.com \
--to=hpa@zytor.com \
--cc=akpm@linux-foundation.org \
--cc=aris@redhat.com \
--cc=borislav.petkov@amd.com \
--cc=edt@aei.ca \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@redhat.com \
--cc=mingo@elte.hu \
--cc=norsk5@yahoo.com \
--cc=petkovbb@googlemail.com \
--cc=randy.dunlap@oracle.com \
--cc=tglx@linutronix.de \
/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