diff options
author | jhb <jhb@FreeBSD.org> | 2008-08-19 19:53:52 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2008-08-19 19:53:52 +0000 |
commit | d90774443d556bbfad2e78eaba79c93230484234 (patch) | |
tree | 54a78b309ff5605f1b1c38a78d05a129df9f9940 /sys/sun4v | |
parent | 6c10b95f591e34da2c498e8f2bccb35a4219ef75 (diff) | |
download | FreeBSD-src-d90774443d556bbfad2e78eaba79c93230484234.zip FreeBSD-src-d90774443d556bbfad2e78eaba79c93230484234.tar.gz |
Export 'struct pcpu' to userland w/o requiring _KERNEL. A few ports
already define _KERNEL to get to this and I'm about to add hooks to
libkvm to access per-CPU data.
MFC after: 1 week
Diffstat (limited to 'sys/sun4v')
-rw-r--r-- | sys/sun4v/include/pcpu.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/sun4v/include/pcpu.h b/sys/sun4v/include/pcpu.h index beb0789..b88ddbb 100644 --- a/sys/sun4v/include/pcpu.h +++ b/sys/sun4v/include/pcpu.h @@ -30,8 +30,6 @@ #ifndef _MACHINE_PCPU_H_ #define _MACHINE_PCPU_H_ -#ifdef _KERNEL - #include <machine/asmacros.h> #include <machine/frame.h> #include <machine/intr_machdep.h> @@ -82,6 +80,9 @@ struct pmap; * be L2 cache aligned - they're surrounded by per-cpu data, so there is * no possibility of false sharing, but this might help in reducing misses */ + +#ifdef _KERNEL + struct pcpu; register struct pcpu *pcpup __asm__(__XSTRING(PCPU_REG)); |