From owner-svn-src-head@freebsd.org Wed May 18 17:26:23 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57FD4B4168C; Wed, 18 May 2016 17:26:23 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from d.mail.sonic.net (d.mail.sonic.net [64.142.111.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 465F01E05; Wed, 18 May 2016 17:26:23 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from zeppelin.tachypleus.net (75-101-50-44.static.sonic.net [75.101.50.44]) (authenticated bits=0) by d.mail.sonic.net (8.15.1/8.15.1) with ESMTPSA id u4IHEWRG004404 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Wed, 18 May 2016 10:14:33 -0700 Subject: Re: svn commit: r300154 - head/sys/net To: Justin Hibbits , Scott Long References: <201605181545.u4IFjCKD030751@repo.freebsd.org> <20160518105033.1eae7432@zhabar.knownspace> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Nathan Whitehorn Message-ID: <759d085c-a485-c2ed-5d70-26eb4d27cdc2@freebsd.org> Date: Wed, 18 May 2016 10:14:32 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <20160518105033.1eae7432@zhabar.knownspace> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Sonic-CAuth: UmFuZG9tSVaDgOEebUKGuxyhreapsXfpKppYZY1G34nxU2jnj52dwgPJDQ9M6DR+pghcyon4ArTJjfBXxCby3bshqfLZPUuFvuGSnUJPJIk= X-Sonic-ID: C;NED//Bsd5hGovrsdzAjavA== M;wjc9/Rsd5hGovrsdzAjavA== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 May 2016 17:26:23 -0000 On 05/18/16 08:50, Justin Hibbits wrote: > On Wed, 18 May 2016 15:45:12 +0000 (UTC) > Scott Long 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 >> #include >> >> - >> - >> -#include >> +#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 >> + >> union ring_state { >> struct { >> uint16_t pidx_head; >> > powerpc64 defines both __powerpc__ and __powerpc64__, so you're killing > atomics on powerpc64 with this. > > - Justin > Don't all of our 64-bit platforms have 64-bit atomics? So you could just #if defined(__LP64__) || defined(__i386__) || defined(__whatever_the_thing_is_for_mips_n32__) -Nathan