Hi,

James Lentini <mailto:[EMAIL PROTECTED]> wrote:
> On Tue, 2 Aug 2005, Guy German wrote:
> 
>> Hi,
>> 
>> [EMAIL PROTECTED] <> wrote:
>>> On Mon, 1 Aug 2005, Tom Duffy wrote:
>>> 
>>>> On Fri, 2005-07-29 at 16:46 -0500, John Partridge wrote:
>>>>> I searched the archives and don't see a solution, but I think I've
>>>>> tracked it down to a bug in ulp/kdapl/ib/dapl_util.h
>>>>> 
>>>>> root on mig133  > diff -ruN dapl_util.h dapl_util.h-johnip
>>>> 
>>>> Please use diff -ruNp.  See FAQ question 10.
>>>> 
>>>>> =============== diff ===============================
>>>>> 
>>>>>   --- dapl_util.h 2005-07-29 16:36:17.514669886 -0500
>>>>>   +++ dapl_util.h-johnip  2005-07-29 16:37:11.514578548 -0500     @@
>>>>> -71,7 +71,7 @@ 
>>>>> 
>>>>>    #ifdef __ia64__
>>>>> 
>>>>>   -       current_value = ia64_cmpxchg("acq", v, match_value,
>>>>>   new_value, 4); +       current_value = ia64_cmpxchg(acq, v,
>>>>> match_value, new_value, 4); 
>>>>> 
>>>>>           #elif defined (__PPC__)
>>>> 
>>>> Please kill dapl_os_atomic_assign().  Just use cmpxchg() directly
>>>> instead.
>>> 
>>> That sounds like a good idea. Any issues with this John?
>> 
>> But what about other platforms (not ia64) - the code would have
>> ifdef in all the places it is used ?
> 
> I think cmpxchg() is defined for each platform Linux runs on. Is that
> not true? 

I guess you are right. I found this (in include/asm-ia64/intrinsics.h):

#define cmpxchg_acq(ptr,o,n)    ia64_cmpxchg(acq, (ptr), (o), (n), 
sizeof(*(ptr)))
#define cmpxchg_rel(ptr,o,n)    ia64_cmpxchg(rel, (ptr), (o), 
(n),sizeof(*(ptr)))

/* for compatibility with other platforms: */
#define cmpxchg(ptr,o,n)        cmpxchg_acq(ptr,o,n)
dapl_evd_event_alloc
dapl_rbuf_alloc
        struct dat_event *event;
        int i;
        int status = 0;

        /* Allocate EVENTs */
        event = vmalloc(evd->qlen * sizeof *event);

#define cmpxchg_acq(ptr,o,n)    ia64_cmpxchg(acq, (ptr), (o), (n), 
sizeof(*(ptr)))
#define cmpxchg_rel(ptr,o,n)    ia64_cmpxchg(rel, (ptr), (o), 
(n),sizeof(*(ptr)))

/* for compatibility with other platforms: */
#define cmpxchg(ptr,o,n)        cmpxchg_acq(ptr,o,n)

"include/asm-ia64/intrinsics.h" 181L, 5355C
_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to