aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/pcpu.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2010-11-11 19:18:52 +0000
committerDimitry Andric <dim@FreeBSD.org>2010-11-11 19:18:52 +0000
commit4403994d7d4815a499b99614c9b69c7360a55cd9 (patch)
treed4abe4c95ec205487b18900f5e8744a6719d57b6 /sys/sys/pcpu.h
parent566af50bd26d7739d1e62d23438b32aef21383eb (diff)
downloadsrc-4403994d7d4815a499b99614c9b69c7360a55cd9.tar.gz
src-4403994d7d4815a499b99614c9b69c7360a55cd9.zip
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
Notes
Notes: svn path=/head/; revision=215138
Diffstat (limited to 'sys/sys/pcpu.h')
-rw-r--r--sys/sys/pcpu.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/sys/pcpu.h b/sys/sys/pcpu.h
index 75017d6c6bcd..b029e1213d45 100644
--- a/sys/sys/pcpu.h
+++ b/sys/sys/pcpu.h
@@ -42,11 +42,15 @@
#include <sys/resource.h>
#include <machine/pcpu.h>
+#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