From owner-svn-src-head@FreeBSD.ORG Thu Nov 11 19:18:52 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A7701065674; Thu, 11 Nov 2010 19:18:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A5948FC1C; Thu, 11 Nov 2010 19:18:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oABJIqHv081684; Thu, 11 Nov 2010 19:18:52 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oABJIqvH081681; Thu, 11 Nov 2010 19:18:52 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201011111918.oABJIqvH081681@svn.freebsd.org> From: Dimitry Andric Date: Thu, 11 Nov 2010 19:18:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215138 - in head/sys: net sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Thu, 11 Nov 2010 19:18:52 -0000 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. 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