aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/pcpu.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2010-11-22 19:32:54 +0000
committerDimitry Andric <dim@FreeBSD.org>2010-11-22 19:32:54 +0000
commit3e288e623846fab91d923dd651b263d4696fd814 (patch)
treeddc86814ee8f35466e619bb63b8f15b41185074e /sys/sys/pcpu.h
parent42298a2e4a7825de8a516c970761ac6e6562b0d9 (diff)
downloadsrc-3e288e623846fab91d923dd651b263d4696fd814.tar.gz
src-3e288e623846fab91d923dd651b263d4696fd814.zip
After some off-list discussion, revert a number of changes to the
DPCPU_DEFINE and VNET_DEFINE macros, as these cause problems for various people working on the affected files. A better long-term solution is still being considered. This reversal may give some modules empty set_pcpu or set_vnet sections, but these are harmless. Changes reverted: ------------------------------------------------------------------------ r215318 | dim | 2010-11-14 21:40:55 +0100 (Sun, 14 Nov 2010) | 4 lines Instead of unconditionally emitting .globl's for the __start_set_xxx and __stop_set_xxx symbols, only emit them when the set_vnet or set_pcpu sections are actually defined. ------------------------------------------------------------------------ r215317 | dim | 2010-11-14 21:38:11 +0100 (Sun, 14 Nov 2010) | 3 lines Apply the STATIC_VNET_DEFINE and STATIC_DPCPU_DEFINE macros throughout the tree. ------------------------------------------------------------------------ r215316 | dim | 2010-11-14 21:23:02 +0100 (Sun, 14 Nov 2010) | 2 lines Add macros to define static instances of VNET_DEFINE and DPCPU_DEFINE.
Notes
Notes: svn path=/head/; revision=215701
Diffstat (limited to 'sys/sys/pcpu.h')
-rw-r--r--sys/sys/pcpu.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/sys/pcpu.h b/sys/sys/pcpu.h
index 81fd7833a5b3..ad1cf33e05b2 100644
--- a/sys/sys/pcpu.h
+++ b/sys/sys/pcpu.h
@@ -51,7 +51,9 @@
* 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.
@@ -73,12 +75,7 @@ extern uintptr_t dpcpu_off[];
*/
#define DPCPU_NAME(n) pcpu_entry_##n
#define DPCPU_DECLARE(t, n) extern t DPCPU_NAME(n)
-#define DPCPU_DEFINE(t, n) \
- __GLOBL("__start_" DPCPU_SETNAME); \
- __GLOBL("__stop_" DPCPU_SETNAME); \
- t DPCPU_NAME(n) __section(DPCPU_SETNAME) __used
-#define STATIC_DPCPU_DEFINE(t, n) \
- DPCPU_DEFINE(static t, n)
+#define DPCPU_DEFINE(t, n) t DPCPU_NAME(n) __section(DPCPU_SETNAME) __used
/*
* Accessors with a given base.