summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/sparc64/include/globals.h21
-rw-r--r--sys/sparc64/sparc64/machdep.c8
2 files changed, 15 insertions, 14 deletions
diff --git a/sys/sparc64/include/globals.h b/sys/sparc64/include/globals.h
index 820c846..01d48a8 100644
--- a/sys/sparc64/include/globals.h
+++ b/sys/sparc64/include/globals.h
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2001 Jake Burkholder.
+ * Copyright (c) 1999 Luoqi Chen <luoqi@freebsd.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -30,19 +30,20 @@
#define _MACHINE_GLOBALS_H_
#ifdef _KERNEL
-
#include <machine/globaldata.h>
-register struct globaldata *globaldata __asm("%g7");
+register struct globaldata *globalp __asm__("%g7");
-#define PCPU_GET(name) (globaldata->gd_ ## name)
-#define PCPU_PTR(name) (&globaldata->gd_ ## name)
-#define PCPU_SET(name, value) (globaldata->gd_ ## name = (value))
+#define GLOBALP globalp
+
+#define PCPU_GET(member) (GLOBALP->gd_ ## member)
+#define PCPU_PTR(member) (&GLOBALP->gd_ ## member)
+#define PCPU_SET(member,value) (GLOBALP->gd_ ## member = (value))
-#define curproc PCPU_GET(curproc)
#define CURPROC PCPU_GET(curproc)
-#define CURTHD PCPU_GET(curproc)
+#define CURTHD PCPU_GET(curproc) /* temporary */
+#define curproc PCPU_GET(curproc)
-#endif /* _KERNEL */
+#endif /* _KERNEL */
-#endif /* !_MACHINE_GLOBALS_H_ */
+#endif /* !_MACHINE_GLOBALS_H_ */
diff --git a/sys/sparc64/sparc64/machdep.c b/sys/sparc64/sparc64/machdep.c
index 744999b..eeb25bb 100644
--- a/sys/sparc64/sparc64/machdep.c
+++ b/sys/sparc64/sparc64/machdep.c
@@ -246,7 +246,7 @@ again:
bufinit();
vm_pager_bufferinit();
- globaldata_register(globaldata);
+ globaldata_register(globalp);
tick_start(clock, tick_hardclock);
}
@@ -322,13 +322,13 @@ sparc64_init(struct bootinfo *bi, ofw_vec_t *vec)
/*
* Initialize the per-cpu pointer so we can set curproc.
*/
- globaldata = &__globaldata;
+ globalp = &__globaldata;
/*
* Setup pointers to interrupt data tables.
*/
- globaldata->gd_iq = &intr_queues[0]; /* XXX cpuno */
- globaldata->gd_ivt = intr_vectors;
+ globalp->gd_iq = &intr_queues[0]; /* XXX cpuno */
+ globalp->gd_ivt = intr_vectors;
/*
* Put the globaldata pointer in the alternate and interrupt %g7 also.
OpenPOWER on IntegriCloud