Andrea Arcangeli wrote:
> Said that if your compiler puts the read before the spin_lock without the
> memory clobber, it is allowed to do that, and in such case you would proof
> it was a real world bug (not just a "documentation" one).
Yes, it does.
> Or maybe your testcase was a bit different then mine, in such case please
> send it to me (I'm curious indeed :).
int *p;
int func()
{
int x = *p;
__asm__ __volatile ("zzz" : :);
x = *p;
return x;
}
In output:
.ident "GCC: (GNU) 2.96 20000724 (experimental)"
>From the Red Hat 7 beta.
-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/
- spin_lock forgets to clobber memory and other smp fixes [... Andrea Arcangeli
- Re: spin_lock forgets to clobber memory and other sm... Andrea Arcangeli
- Re: spin_lock forgets to clobber memory and othe... Franz Sirl
- Re: spin_lock forgets to clobber memory and ... Andrea Arcangeli
- Re: spin_lock forgets to clobber memory and othe... Jamie Lokier
- Re: spin_lock forgets to clobber memory and ... Andrea Arcangeli
- Re: spin_lock forgets to clobber memory ... Jamie Lokier
- Re: spin_lock forgets to clobber me... Linus Torvalds
- Re: spin_lock forgets to clobbe... Jamie Lokier
- Re: spin_lock forgets to clobber me... Andrea Arcangeli
- Re: spin_lock forgets to clobbe... Jamie Lokier
- Re: spin_lock forgets to clobbe... Andrea Arcangeli
- Re: spin_lock forgets to clobber memory and ... Linus Torvalds
- Re: spin_lock forgets to clobber memory ... Jamie Lokier
- Re: spin_lock forgets to clobber memory and othe... Linus Torvalds
- Re: spin_lock forgets to clobber memory and ... Jamie Lokier
- Re: spin_lock forgets to clobber memory ... Linus Torvalds
- Re: spin_lock forgets to clobber memory ... Andrea Arcangeli
- Re: spin_lock forgets to clobber me... Jamie Lokier
- Re: spin_lock forgets to clobbe... Andrea Arcangeli
- Re: spin_lock forgets to clobber me... David Woodhouse

