diff options
author | obrien <obrien@FreeBSD.org> | 2001-08-20 21:29:16 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2001-08-20 21:29:16 +0000 |
commit | 355b16412ac98cbf56f3465797c1295331997d35 (patch) | |
tree | f61373350613d9b04195e87c0fc975e5369e2552 /sys/sparc64 | |
parent | 13444b820b77541cb2a313742b8a9c360eb2ea67 (diff) | |
download | FreeBSD-src-355b16412ac98cbf56f3465797c1295331997d35.zip FreeBSD-src-355b16412ac98cbf56f3465797c1295331997d35.tar.gz |
Sync globals.h up with the other platforms. There is still some cruft in
here, but now all the platforms have the same cruft. Consistantly spell
the `struct globaldata *' "globalp".
Reviewed by: peter
Diffstat (limited to 'sys/sparc64')
-rw-r--r-- | sys/sparc64/include/globals.h | 21 | ||||
-rw-r--r-- | sys/sparc64/sparc64/machdep.c | 8 |
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. |