diff options
author | Bruce Evans <bde@FreeBSD.org> | 2000-10-27 08:30:59 +0000 |
---|---|---|
committer | Bruce Evans <bde@FreeBSD.org> | 2000-10-27 08:30:59 +0000 |
commit | 4a3bb59944a6e593c56e78f054052a20df244406 (patch) | |
tree | 5b3fc6a80310f3e8240dc894e97f9bd00b389c5c /sys/i386 | |
parent | 3cebc3e4de5ab47320131b48c4f6996deba48a60 (diff) |
Declare or #define per-cpu globals in <machine/globals.h> in all cases.
The i386 UP case was messily different.
Notes
Notes:
svn path=/head/; revision=67694
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/i386/bios.c | 1 | ||||
-rw-r--r-- | sys/i386/i386/machdep.c | 3 | ||||
-rw-r--r-- | sys/i386/include/cpu.h | 3 | ||||
-rw-r--r-- | sys/i386/include/globals.h | 14 | ||||
-rw-r--r-- | sys/i386/include/npx.h | 6 | ||||
-rw-r--r-- | sys/i386/include/pcb.h | 6 | ||||
-rw-r--r-- | sys/i386/include/segments.h | 2 | ||||
-rw-r--r-- | sys/i386/include/tss.h | 8 |
8 files changed, 11 insertions, 32 deletions
diff --git a/sys/i386/i386/bios.c b/sys/i386/i386/bios.c index 56880eaa2bc4..a22f154905ea 100644 --- a/sys/i386/i386/bios.c +++ b/sys/i386/i386/bios.c @@ -40,6 +40,7 @@ #include <sys/bus.h> #include <vm/vm.h> #include <vm/pmap.h> +#include <machine/globals.h> #include <machine/md_var.h> #include <machine/segments.h> #include <machine/stdarg.h> diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index 03bd07d26652..62c698ba6212 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -1169,9 +1169,6 @@ union descriptor ldt[NLDT]; /* local descriptor table */ struct region_descriptor r_gdt, r_idt; #endif -#ifndef SMP -extern struct segment_descriptor common_tssd, *tss_gdt; -#endif int private_tss; /* flag indicating private tss */ #if defined(I586_CPU) && !defined(NO_F00F_HACK) diff --git a/sys/i386/include/cpu.h b/sys/i386/include/cpu.h index 74a260dcc8aa..7b090b66c81c 100644 --- a/sys/i386/include/cpu.h +++ b/sys/i386/include/cpu.h @@ -130,9 +130,6 @@ #ifdef _KERNEL extern char btext[]; extern char etext[]; -#ifndef intr_nesting_level -extern u_char intr_nesting_level; -#endif void fork_trampoline __P((void)); void fork_return __P((struct proc *, struct trapframe)); diff --git a/sys/i386/include/globals.h b/sys/i386/include/globals.h index b7b7932e2567..846cba9c34c7 100644 --- a/sys/i386/include/globals.h +++ b/sys/i386/include/globals.h @@ -125,6 +125,16 @@ _global_globaldata(void) #else /* !(SMP || KLD_MODULE) */ extern u_int astpending; +extern struct i386tss common_tss; +extern struct segment_descriptor common_tssd; +extern struct pcb *curpcb; /* Our current running pcb. */ +extern struct proc *curproc; /* Current running proc. */ +extern struct proc *idleproc; /* Current idle proc. */ +extern u_char intr_nesting_level; +extern struct proc *npxproc; +extern int switchticks; /* `ticks' at last context switch. */ +extern struct timeval switchtime; /* Uptime at last context switch. */ +extern struct segment_descriptor *tss_gdt; #endif /* SMP || KLD_MODULE */ @@ -174,10 +184,6 @@ GLOBAL_FUNC(witness_spin_check) #define GLOBALDATA (&globaldata) #endif -#ifndef curproc -struct proc; -extern struct proc *curproc; -#endif #define CURTHD curproc #define CURPROC curproc diff --git a/sys/i386/include/npx.h b/sys/i386/include/npx.h index 695ab2a5b61c..81acc465efe2 100644 --- a/sys/i386/include/npx.h +++ b/sys/i386/include/npx.h @@ -45,8 +45,6 @@ #ifndef _MACHINE_NPX_H_ #define _MACHINE_NPX_H_ -#include <machine/globals.h> - /* Environment information of floating point unit */ struct env87 { long en_cw; /* control word (16bits) */ @@ -107,10 +105,6 @@ struct save87 { #define __INITIAL_NPXCW__ 0x127F #ifdef _KERNEL -#ifndef npxproc -extern struct proc *npxproc; -#endif - int npxdna __P((void)); void npxexit __P((struct proc *p)); void npxinit __P((int control)); diff --git a/sys/i386/include/pcb.h b/sys/i386/include/pcb.h index 1c7af8505ab1..f342ea6d3fd7 100644 --- a/sys/i386/include/pcb.h +++ b/sys/i386/include/pcb.h @@ -43,7 +43,6 @@ /* * Intel 386 process control block */ -#include <machine/globals.h> #include <machine/npx.h> struct pcb { @@ -86,11 +85,6 @@ struct md_coredump { }; #ifdef _KERNEL - -#ifndef curpcb -extern struct pcb *curpcb; /* our current running pcb */ -#endif - void savectx __P((struct pcb *)); #endif diff --git a/sys/i386/include/segments.h b/sys/i386/include/segments.h index 4a7e368fb055..82e9d74f696f 100644 --- a/sys/i386/include/segments.h +++ b/sys/i386/include/segments.h @@ -41,8 +41,6 @@ #ifndef _MACHINE_SEGMENTS_H_ #define _MACHINE_SEGMENTS_H_ -#include <machine/globals.h> - /* * 386 Segmentation Data Structures and definitions * William F. Jolitz (william@ernie.berkeley.edu) 6/20/1989 diff --git a/sys/i386/include/tss.h b/sys/i386/include/tss.h index 77b94437c034..101c218f3d5e 100644 --- a/sys/i386/include/tss.h +++ b/sys/i386/include/tss.h @@ -40,8 +40,6 @@ #ifndef _MACHINE_TSS_H_ #define _MACHINE_TSS_H_ 1 -#include <machine/globals.h> - /* * Intel 386 Context Data Type */ @@ -82,10 +80,4 @@ struct i386tss { /* XXX unimplemented .. i/o permission bitmap */ }; -#ifdef _KERNEL -#ifndef common_tss -extern struct i386tss common_tss; -#endif -#endif - #endif /* _MACHINE_TSS_H_ */ |