From: Andi Kleen <ak@suse.de>
To: "chaitanya Huilgol" <chaitanya@tidaldata.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: FW: cmpxchg hard lockup on AMD64 - ASUS(A8V-MX)
Date: 22 May 2006 13:12:54 +0200 [thread overview]
Message-ID: <p73psi671op.fsf@verdi.suse.de> (raw)
In-Reply-To: <007a01c67d75$b627b8e0$40c8720a@Everest>
"chaitanya Huilgol" <chaitanya@tidaldata.com> writes:
> {
> __asm__ __volatile__ (
> "# LFPUSH \n\t"
> "1:\t"
> "movl %2, (%1) \n"
> LOCK "cmpxchg %1, %0 \n\t"
> "jnz 1b \n\t"
> :
> :"m" (*lf), "r" (cl), "a" (lf->top)
You don't tell gcc *lf is modified.
> );
> }
>
> cell* pop (lifo * lf)
> {
> cell* v=0;
> __asm__ __volatile__ (
> "# LFPOP \n\t"
> "testl %%eax, %%eax \n\t"
> "jz 20f \n"
> "10:\t"
> "movl (%%eax), %%ebx \n\t"
> "movl %%edx, %%ecx \n\t"
> "incl %%ecx \n\t"
Nothing uses the incremented %ecx
> LOCK "cmpxchg8b %1 \n\t"
> "jz 20f \n\t"
> "testl %%eax, %%eax \n\t"
> "jnz 10b \n"
> "20:\t"
> :"=a" (v)
> :"m" (*lf),
And you don't tell *lf is modified again.
It could be just a miscompilation caused by your wrong asm constraints.
-Andi
prev parent reply other threads:[~2006-05-22 11:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-22 7:59 FW: cmpxchg hard lockup on AMD64 - ASUS(A8V-MX) chaitanya Huilgol
2006-05-22 11:12 ` Andi Kleen [this message]
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=p73psi671op.fsf@verdi.suse.de \
--to=ak@suse.de \
--cc=chaitanya@tidaldata.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