diff options
author | bde <bde@FreeBSD.org> | 1999-01-08 19:17:49 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1999-01-08 19:17:49 +0000 |
commit | e53595f704322430791eaee9e3f65b0c80fc6c0e (patch) | |
tree | 9d92ec9b3a3e856f5448f3b7b6425b4c61ec9de5 /sys/amd64 | |
parent | 670683fcb99d8dc6fd235f8111c5c641e149a065 (diff) | |
download | FreeBSD-src-e53595f704322430791eaee9e3f65b0c80fc6c0e.zip FreeBSD-src-e53595f704322430791eaee9e3f65b0c80fc6c0e.tar.gz |
Unspammed includes in <machine/cpufunc.h> in the !SMP case. Partially
unspammed them in the SMP case.
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/include/cpufunc.h | 23 | ||||
-rw-r--r-- | sys/amd64/isa/intr_machdep.c | 5 | ||||
-rw-r--r-- | sys/amd64/isa/nmi.c | 5 |
3 files changed, 21 insertions, 12 deletions
diff --git a/sys/amd64/include/cpufunc.h b/sys/amd64/include/cpufunc.h index bd14162..c3dd48b 100644 --- a/sys/amd64/include/cpufunc.h +++ b/sys/amd64/include/cpufunc.h @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: cpufunc.h,v 1.81 1998/08/17 08:57:05 dfr Exp $ + * $Id: cpufunc.h,v 1.82 1999/01/08 16:29:57 bde Exp $ */ /* @@ -40,15 +40,6 @@ #ifndef _MACHINE_CPUFUNC_H_ #define _MACHINE_CPUFUNC_H_ -#include <sys/cdefs.h> -#include <sys/types.h> - -#include <machine/lock.h> - -#if defined(SWTCH_OPTIM_STATS) -extern int tlb_flush_count; -#endif - #define readb(va) (*(volatile u_int8_t *) (va)) #define readw(va) (*(volatile u_int16_t *) (va)) #define readl(va) (*(volatile u_int32_t *) (va)) @@ -59,6 +50,14 @@ extern int tlb_flush_count; #ifdef __GNUC__ +#ifdef SMP +#include <machine/lock.h> /* XXX */ +#endif + +#ifdef SWTCH_OPTIM_STATS +extern int tlb_flush_count; /* XXX */ +#endif + static __inline void breakpoint(void) { @@ -69,13 +68,17 @@ static __inline void disable_intr(void) { __asm __volatile("cli" : : : "memory"); +#ifdef SMP MPINTR_LOCK(); +#endif } static __inline void enable_intr(void) { +#ifdef SMP MPINTR_UNLOCK(); +#endif __asm __volatile("sti"); } diff --git a/sys/amd64/isa/intr_machdep.c b/sys/amd64/isa/intr_machdep.c index 08c2049..0254195 100644 --- a/sys/amd64/isa/intr_machdep.c +++ b/sys/amd64/isa/intr_machdep.c @@ -34,12 +34,15 @@ * SUCH DAMAGE. * * from: @(#)isa.c 7.2 (Berkeley) 5/13/91 - * $Id: intr_machdep.c,v 1.14 1998/09/06 22:41:41 tegge Exp $ + * $Id: intr_machdep.c,v 1.15 1998/12/04 22:54:46 archie Exp $ */ #include "opt_auto_eoi.h" #include <sys/param.h> +#ifndef SMP +#include <machine/lock.h> +#endif #include <sys/systm.h> #include <sys/syslog.h> #include <machine/ipl.h> diff --git a/sys/amd64/isa/nmi.c b/sys/amd64/isa/nmi.c index 08c2049..0254195 100644 --- a/sys/amd64/isa/nmi.c +++ b/sys/amd64/isa/nmi.c @@ -34,12 +34,15 @@ * SUCH DAMAGE. * * from: @(#)isa.c 7.2 (Berkeley) 5/13/91 - * $Id: intr_machdep.c,v 1.14 1998/09/06 22:41:41 tegge Exp $ + * $Id: intr_machdep.c,v 1.15 1998/12/04 22:54:46 archie Exp $ */ #include "opt_auto_eoi.h" #include <sys/param.h> +#ifndef SMP +#include <machine/lock.h> +#endif #include <sys/systm.h> #include <sys/syslog.h> #include <machine/ipl.h> |