From owner-svn-src-all@FreeBSD.ORG Thu Nov 11 19:37:26 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 D9C1A106566C; Thu, 11 Nov 2010 19:37:26 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 50C7E8FC16; Thu, 11 Nov 2010 19:37:26 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:a528:e2d2:e8bb:bf7b] (unknown [IPv6:2001:7b8:3a7:0:a528:e2d2:e8bb:bf7b]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 87C775C43; Thu, 11 Nov 2010 20:37:24 +0100 (CET) Message-ID: <4CDC45F7.8060506@FreeBSD.org> Date: Thu, 11 Nov 2010 20:37:27 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.13pre) Gecko/20101104 Lanikai/3.1.7pre MIME-Version: 1.0 To: Andriy Gapon References: <201011111918.oABJIqvH081681@svn.freebsd.org> <4CDC43FE.6060401@freebsd.org> In-Reply-To: <4CDC43FE.6060401@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed 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:37:27 -0000 On 2010-11-11 20:29, Andriy Gapon wrote: > Do I understand it correctly that set_pcpu section itself would not be produced if > DPCPU_DEFINE() is not actually used? Yes, although currently this does not occur in any kernel module (I tested using make universe). But indeed, if you would include e.g. vnet.h or pcpu.h, but did not use any VNET_DEFINE or DPCPU_DEFINE macros, you would get an error during linking. The proper fix for this is to use the __GLOBL macros only when actually invoking the VNET_DEFINE or DPCPU_DEFINE macros, just as with the __MAKE_SET macro. But this is made more difficult by the fact that many invocations of VNET_DEFINE and DPCPU_DEFINE are either prefixed with 'static', or postfixed with '= literal_value'. Maybe we could use separate VNET_DEFINE_STATIC and DPCPU_DEFINE_STATIC macros for this, since it looks like some of the definitions actually define public variables...