[openib-general] Re: [PATCH] uDAPL build fix for OS vendor variations of IA64_FETCHADD

James Lentini jlentini at netapp.com
Wed Sep 28 14:16:00 PDT 2005



On Wed, 28 Sep 2005, Arlin Davis wrote:

> James Lentini wrote:
> 
> > Hi Arlin, 
> > A couple of questions:
> > 
> >  
> > > Index: dapl/udapl/linux/dapl_osd.h
> > > ===================================================================
> > > --- dapl/udapl/linux/dapl_osd.h	(revision 3541)
> > > +++ dapl/udapl/linux/dapl_osd.h	(working copy)
> > > @@ -83,7 +83,6 @@
> > > #include <asm/system.h>
> > > #endif
> > > 
> > > -
> > > /* Useful debug definitions */
> > > #ifndef STATIC
> > > #define STATIC static
> > > @@ -156,13 +155,17 @@
> > > #ifdef __ia64__
> > >     DAT_COUNT	old_value;
> > > 
> > > -#if OS_VERSION >= LINUX_VERSION(2,6)
> > > -    IA64_FETCHADD  (old_value,v,1,4,rel);
> > > +#ifndef REDHAT_EL4
> > > +#   if OS_RELEASE >= LINUX_VERSION(2,6)
> > > +	IA64_FETCHADD(old_value,v,1,4,rel);
> > > +#   else
> > > +	IA64_FETCHADD(old_value,v,1,4);
> > > +#   endif
> > > #else
> > > -    IA64_FETCHADD  (old_value,v,1,4);
> > > +   IA64_FETCHADD(old_value,v,1,4);
> > > #endif
> > >    
> > 
> > Previously, if we were on Linux => 2.6, we used the 5 parameter version,
> > otherwise we used the 4 parameter version. 
> > Why don't we continue to use the 5 parameter version if we are on Linux =>
> > 2.6 and not REHHAT_EL4?
> >  
> good point. something like this ?
> 
> #if !defined(REDHAT_EL4) && (OS_RELEASE >= LINUX_VERSION(2,6))
>        IA64_FETCHADD(old_value,v,-1,4,rel);
> #   else
>        IA64_FETCHADD(old_value,v,-1,4);
> #endif

Looks good.

I'll update the patch and commit.



More information about the general mailing list