[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] Alpha: fix locked loads/stores
From: |
Laurent Desnogues |
Subject: |
Re: [Qemu-devel] [PATCH] Alpha: fix locked loads/stores |
Date: |
Fri, 7 Nov 2008 15:19:08 +0100 |
On Fri, Nov 7, 2008 at 3:00 PM, Aurelien Jarno <address@hidden> wrote:
> On Fri, Nov 07, 2008 at 12:34:29PM +0100, Laurent Desnogues wrote:
>> Hello,
>>
>> this patch is based on Vince Weaver patch for locked loads/stores.
>> It was checked against Alpha architecture manual.
>>
>> Two fixes were done to Vince's patch:
>>
>> - use a comparison to 1 for lock instead of 0 to be closer to the
>> Alpha spec
>
> I don't agree with this part. The current code use a single variable for
> both address and lock_bit to spare a few tests. Basically it sets
> cpu_lock to -1 when not locked and stores the address when locked. Your
> patch does not compare the address, so it will break multi-threading.
My understanding of the Alpha architecture manual is that
if the addresses don't meet certain criteria (which you
simplify to addresses comparison) then failure or success
of st_c is UNPREDICTABLE (I am not shouting, it's the way
they write it :-) unless some lock clearing occurred (cf
section 4.2.5).
I am not arguing, I just wonder...
Laurent
- [Qemu-devel] [PATCH] Alpha: fix locked loads/stores, Laurent Desnogues, 2008/11/07
- Re: [Qemu-devel] [PATCH] Alpha: fix locked loads/stores, Aurelien Jarno, 2008/11/07
- Re: [Qemu-devel] [PATCH] Alpha: fix locked loads/stores,
Laurent Desnogues <=
- Re: [Qemu-devel] [PATCH] Alpha: fix locked loads/stores, Aurelien Jarno, 2008/11/07
- Re: [Qemu-devel] [PATCH] Alpha: fix locked loads/stores, Laurent Desnogues, 2008/11/07
- Re: [Qemu-devel] [PATCH] Alpha: fix locked loads/stores, Vince Weaver, 2008/11/07
- Re: [Qemu-devel] [PATCH] Alpha: fix locked loads/stores, Aurelien Jarno, 2008/11/08
- Re: [Qemu-devel] [PATCH] Alpha: fix locked loads/stores, Laurent Desnogues, 2008/11/08
- Re: [Qemu-devel] [PATCH] Alpha: fix locked loads/stores, Paul Brook, 2008/11/07