From owner-svn-src-all@FreeBSD.ORG Thu Nov 11 19:29:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2811E1065673; Thu, 11 Nov 2010 19:29:06 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id C248C8FC0C; Thu, 11 Nov 2010 19:29:04 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id VAA17466; Thu, 11 Nov 2010 21:29:03 +0200 (EET) (envelope-from avg@freebsd.org) Message-ID: <4CDC43FE.6060401@freebsd.org> Date: Thu, 11 Nov 2010 21:29:02 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101029 Lightning/1.0b2 Thunderbird/3.1.6 MIME-Version: 1.0 To: Dimitry Andric References: <201011111918.oABJIqvH081681@svn.freebsd.org> In-Reply-To: <201011111918.oABJIqvH081681@svn.freebsd.org> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215138 - in head/sys: net sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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: Thu, 11 Nov 2010 19:29:06 -0000 on 11/11/2010 21:18 Dimitry Andric said the following: > Author: dim > Date: Thu Nov 11 19:18:52 2010 > New Revision: 215138 > URL: http://svn.freebsd.org/changeset/base/215138 > > Log: > Use the same treatment as in linker_set.h for the __start and __stop > symbols of the set_vnet and set_pcpu sections, so those symbols will > always be emitted in kernel modules, if they use vnet.h or pcpu.h. Do I understand it correctly that set_pcpu section itself would not be produced if DPCPU_DEFINE() is not actually used? > Also, for pcpu.h, make the __(start|stop)_set_pcpu declarations, and > associated macros invisible to userland, to prevent it picking up these > symbols. > > Reviewed by: kib > > Modified: > head/sys/net/vnet.h > head/sys/sys/pcpu.h > > Modified: head/sys/net/vnet.h > ============================================================================== > --- head/sys/net/vnet.h Thu Nov 11 19:17:59 2010 (r215137) > +++ head/sys/net/vnet.h Thu Nov 11 19:18:52 2010 (r215138) > @@ -95,7 +95,9 @@ struct vnet { > * Location of the kernel's 'set_vnet' linker set. > */ > extern uintptr_t *__start_set_vnet; > +__GLOBL(__start_set_vnet); > extern uintptr_t *__stop_set_vnet; > +__GLOBL(__stop_set_vnet); > > #define VNET_START (uintptr_t)&__start_set_vnet > #define VNET_STOP (uintptr_t)&__stop_set_vnet > > Modified: head/sys/sys/pcpu.h > ============================================================================== > --- head/sys/sys/pcpu.h Thu Nov 11 19:17:59 2010 (r215137) > +++ head/sys/sys/pcpu.h Thu Nov 11 19:18:52 2010 (r215138) > @@ -42,11 +42,15 @@ > #include > #include > > +#ifdef _KERNEL > + > /* > * Define a set for pcpu data. > */ > extern uintptr_t *__start_set_pcpu; > +__GLOBL(__start_set_pcpu); > extern uintptr_t *__stop_set_pcpu; > +__GLOBL(__stop_set_pcpu); > > /* > * Array of dynamic pcpu base offsets. Indexed by id. > @@ -127,6 +131,8 @@ extern uintptr_t dpcpu_off[]; > } \ > } while(0) > > +#endif /* _KERNEL */ > + > /* > * XXXUPS remove as soon as we have per cpu variable > * linker sets and can define rm_queue in _rm_lock.h -- Andriy Gapon