Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 May 2016 11:41:34 -0500
From:      Justin Hibbits <chmeeedalf@gmail.com>
To:        Scott Long <scott4long@yahoo.com>
Cc:        Warner Losh <imp@bsdimp.com>, Scott Long <scottl@freebsd.org>, src-committers <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r300154 - head/sys/net
Message-ID:  <20160518114134.7a32e69e@zhabar.knownspace>
In-Reply-To: <7EC6D845-E9EE-4D9E-988B-D433526BAAB1@yahoo.com>
References:  <201605181545.u4IFjCKD030751@repo.freebsd.org> <20160518105033.1eae7432@zhabar.knownspace> <CANCZdfpn=SpmQi-ZWZphQjAn3s_g=hmuSbUkO4uGTA1q_vWwSg@mail.gmail.com> <7EC6D845-E9EE-4D9E-988B-D433526BAAB1@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
#if (defined(__powerpc__) && !defined(__powerpc64__)) ||
(defined(__mips__) && !defined(__mips64__))

should work.

- Justin

On Wed, 18 May 2016 10:40:27 -0600
Scott Long <scott4long@yahoo.com> wrote:

> What should I use instead?
> 
> Scott
> 
> > On May 18, 2016, at 10:03 AM, Warner Losh <imp@bsdimp.com> wrote:
> > 
> > Ditto with mips.
> > 
> > On Wed, May 18, 2016 at 9:50 AM, Justin Hibbits
> > <chmeeedalf@gmail.com> wrote: On Wed, 18 May 2016 15:45:12 +0000
> > (UTC) Scott Long <scottl@FreeBSD.org> wrote:
> >   
> > > Author: scottl
> > > Date: Wed May 18 15:45:12 2016
> > > New Revision: 300154
> > > URL: https://svnweb.freebsd.org/changeset/base/300154
> > >
> > > Log:
> > >   Activate the NO_64BIT_ATOMICS code for mips and powerpc
> > >
> > > Modified:
> > >   head/sys/net/mp_ring.c
> > >
> > > Modified: head/sys/net/mp_ring.c
> > > ==============================================================================
> > > --- head/sys/net/mp_ring.c    Wed May 18 15:44:45 2016
> > > (r300153) +++ head/sys/net/mp_ring.c  Wed May 18 15:45:12
> > > 2016  (r300154) @@ -37,15 +37,17 @@ __FBSDID("$FreeBSD$");
> > >  #include <sys/malloc.h>
> > >  #include <machine/cpu.h>
> > >
> > > -
> > > -
> > > -#include <net/mp_ring.h>
> > > +#if defined(__powerpc__) || defined(__mips__)
> > > +#define NO_64BIT_ATOMICS
> > > +#endif
> > >
> > >  #if defined(__i386__)
> > >  #define atomic_cmpset_acq_64 atomic_cmpset_64
> > >  #define atomic_cmpset_rel_64 atomic_cmpset_64
> > >  #endif
> > >
> > > +#include <net/mp_ring.h>
> > > +
> > >  union ring_state {
> > >       struct {
> > >               uint16_t pidx_head;
> > >  
> > 
> > powerpc64 defines both __powerpc__ and __powerpc64__, so you're
> > killing atomics on powerpc64 with this.
> > 
> > - Justin
> > 
> >   
> 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160518114134.7a32e69e>