summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/include
diff options
context:
space:
mode:
authorjake <jake@FreeBSD.org>2001-01-06 19:55:42 +0000
committerjake <jake@FreeBSD.org>2001-01-06 19:55:42 +0000
commitd20b7bdad1cabae99d52383ab00b455a70558e62 (patch)
treeb710edcc4a8e3ce6504713a7a74b941215c93632 /sys/powerpc/include
parentda015457f35732efc397d429bd0d118dd5c5661a (diff)
downloadFreeBSD-src-d20b7bdad1cabae99d52383ab00b455a70558e62.zip
FreeBSD-src-d20b7bdad1cabae99d52383ab00b455a70558e62.tar.gz
Implement accessors for per-cpu variables which don't depend on the
symbols in globals.s. PCPU_GET(name) returns the value of the per-cpu variable PCPU_PTR(name) returns a pointer to the per-cpu variable PCPU_SET(name, val) sets the value of the per-cpu variable In general these are not yet used, compatibility macros remain. Unifdef SMP struct globaldata, this makes variables such as cpuid available for UP as well. Rebuilding modules is probably a good idea, but I believe old modules will still work, as most of the old infrastructure remains.
Diffstat (limited to 'sys/powerpc/include')
-rw-r--r--sys/powerpc/include/globals.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/powerpc/include/globals.h b/sys/powerpc/include/globals.h
index 970ef68..85fcad3 100644
--- a/sys/powerpc/include/globals.h
+++ b/sys/powerpc/include/globals.h
@@ -41,6 +41,7 @@ register struct globaldata *globalp __asm__("$8");
#endif
#define PCPU_GET(name) (GLOBALP->gd_##name)
+#define PCPU_PTR(name) (&GLOBALP->gd_##name)
#define PCPU_SET(name,value) (GLOBALP->gd_##name = (value))
/*
OpenPOWER on IntegriCloud