From owner-svn-src-all@freebsd.org Fri Feb 24 15:06:38 2017 Return-Path: Delivered-To: svn-src-all@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 B8E7CCEBC25; Fri, 24 Feb 2017 15:06:38 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-pf0-x244.google.com (mail-pf0-x244.google.com [IPv6:2607:f8b0:400e:c00::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7C04118CA; Fri, 24 Feb 2017 15:06:38 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-pf0-x244.google.com with SMTP id 68so1135629pfx.2; Fri, 24 Feb 2017 07:06:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=GWEguUqvZG8CyUkbOS8Gtq4tEeFIscLm9PLDT+Ruat4=; b=dFVtHrrZ6WPINTEdtavhUzSokf5poh4hmzCx4GlAQ9Xe1xnmDynSFwblcT8mgH7WT1 BzGbCZtAvY7B0MoQFRuYiPNRnfWHKARZydz58jDUFcLC+//Hf9uwi2kLNRSjwJ1Cne77 nvpw5VnDximqdjaBP7PufJycedi+DKQKrN+8DdxEeKciC2I14gIT1gU9EyaYxVFQEp9j GZGPnsMmBzFz4wlO9LlE+e5WGJotlZgJnhGLMF/iJ1UsWSh3u7L0sNchfsbGkGRPqWdD 3WDRBef04VyhPxhNigsFciwlgaP3Wpj8oB4dEgf4ACQZWzIA+bF7D9TSvowLWwF+m+lu 86rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=GWEguUqvZG8CyUkbOS8Gtq4tEeFIscLm9PLDT+Ruat4=; b=QOl+UxuwqsEvmrl4GpotCFuOSnwUKWp0QQCsJPxV/6aLpbIFl6TJajq1yncYS2cu55 bMfIf0gJPJBVBaaahOxcKRWgKCvm5H7J6RVCpCswHJ+mjX/qfNgW8LL5S3BtDQB96YZe INxnGf0qUtRwO/AYs2bFzVOYShdW0WyL/QrjUroDMvlsXEqJOh2B0+u/YxmxJvy70xok awxhIb5k92RTbn/GZnYFGkplRmwNcC2rOtMi4pBZIzQs97Jq77CkUEwwv36Spi/9uJk5 hqyCrMWx0q8rgB1lXOiNXKvu6BatBFMPMsQk3SlBLfh4iRHXt6rELf1Uaq1oEppJt+vF jQag== X-Gm-Message-State: AMke39lNk5M2Xgm+nWu/e+CGIC2PAbRnhgnzyKGPEDO1zrgIfa69qwi4xKzz86OvNTGE1w== X-Received: by 10.98.216.202 with SMTP id e193mr4014702pfg.80.1487948797774; Fri, 24 Feb 2017 07:06:37 -0800 (PST) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by smtp.gmail.com with ESMTPSA id s64sm15768323pfe.27.2017.02.24.07.06.34 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 24 Feb 2017 07:06:37 -0800 (PST) Date: Fri, 24 Feb 2017 16:06:28 +0100 From: Mateusz Guzik To: Hans Petter Selasky Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r314207 - head/sys/compat/linuxkpi/common/include/linux Message-ID: <20170224150628.GA19697@dft-labs.eu> References: <201702241440.v1OEeFJa095968@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201702241440.v1OEeFJa095968@repo.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2017 15:06:38 -0000 On Fri, Feb 24, 2017 at 02:40:15PM +0000, Hans Petter Selasky wrote: > Author: hselasky > Date: Fri Feb 24 14:40:15 2017 > New Revision: 314207 > URL: https://svnweb.freebsd.org/changeset/base/314207 > > Log: > Implement srcu_dereference() macro in the LinuxKPI. > > MFC after: 1 week > Sponsored by: Mellanox Technologies > > Modified: > head/sys/compat/linuxkpi/common/include/linux/srcu.h > > Modified: head/sys/compat/linuxkpi/common/include/linux/srcu.h > ============================================================================== > --- head/sys/compat/linuxkpi/common/include/linux/srcu.h Fri Feb 24 14:37:55 2017 (r314206) > +++ head/sys/compat/linuxkpi/common/include/linux/srcu.h Fri Feb 24 14:40:15 2017 (r314207) > @@ -34,6 +34,8 @@ struct srcu_struct { > struct ck_epoch_record *ss_epoch_record; > }; > > +#define srcu_dereference(ptr,srcu) ((__typeof(*(ptr)) *)(ptr)) > + Should not this cast to volatile and read through that? -- Mateusz Guzik