diff --git a/sys/amd64/include/cpufunc.h b/sys/amd64/include/cpufunc.h index bd14162c2617..c3dd48be18dd 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 -#include - -#include - -#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 /* 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 08c20498480b..0254195f5ddb 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 +#ifndef SMP +#include +#endif #include #include #include diff --git a/sys/amd64/isa/nmi.c b/sys/amd64/isa/nmi.c index 08c20498480b..0254195f5ddb 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 +#ifndef SMP +#include +#endif #include #include #include diff --git a/sys/dev/advansys/adwlib.c b/sys/dev/advansys/adwlib.c index e2b93ac0fc2c..c727ca633b75 100644 --- a/sys/dev/advansys/adwlib.c +++ b/sys/dev/advansys/adwlib.c @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: adwlib.c,v 1.1 1998/10/07 03:20:46 gibbs Exp $ */ /* * Ported from: @@ -43,7 +43,8 @@ * code retain the above copyright notice and this comment without * modification. */ -#include + +#include #include #include diff --git a/sys/dev/cy/cy.c b/sys/dev/cy/cy.c index 30a2caccb520..794d4d690b92 100644 --- a/sys/dev/cy/cy.c +++ b/sys/dev/cy/cy.c @@ -27,7 +27,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: cy.c,v 1.81 1998/12/19 16:28:57 bde Exp $ + * $Id: cy.c,v 1.82 1998/12/24 14:17:57 bde Exp $ */ #include "opt_compat.h" @@ -86,6 +86,9 @@ #include #include +#ifndef SMP +#include +#endif #include #include diff --git a/sys/dev/cy/cy_isa.c b/sys/dev/cy/cy_isa.c index 30a2caccb520..794d4d690b92 100644 --- a/sys/dev/cy/cy_isa.c +++ b/sys/dev/cy/cy_isa.c @@ -27,7 +27,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: cy.c,v 1.81 1998/12/19 16:28:57 bde Exp $ + * $Id: cy.c,v 1.82 1998/12/24 14:17:57 bde Exp $ */ #include "opt_compat.h" @@ -86,6 +86,9 @@ #include #include +#ifndef SMP +#include +#endif #include #include diff --git a/sys/i386/include/cpufunc.h b/sys/i386/include/cpufunc.h index bd14162c2617..c3dd48be18dd 100644 --- a/sys/i386/include/cpufunc.h +++ b/sys/i386/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 -#include - -#include - -#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 /* 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/i386/isa/cy.c b/sys/i386/isa/cy.c index 30a2caccb520..794d4d690b92 100644 --- a/sys/i386/isa/cy.c +++ b/sys/i386/isa/cy.c @@ -27,7 +27,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: cy.c,v 1.81 1998/12/19 16:28:57 bde Exp $ + * $Id: cy.c,v 1.82 1998/12/24 14:17:57 bde Exp $ */ #include "opt_compat.h" @@ -86,6 +86,9 @@ #include #include +#ifndef SMP +#include +#endif #include #include diff --git a/sys/i386/isa/intr_machdep.c b/sys/i386/isa/intr_machdep.c index 08c20498480b..0254195f5ddb 100644 --- a/sys/i386/isa/intr_machdep.c +++ b/sys/i386/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 +#ifndef SMP +#include +#endif #include #include #include diff --git a/sys/i386/isa/nmi.c b/sys/i386/isa/nmi.c index 08c20498480b..0254195f5ddb 100644 --- a/sys/i386/isa/nmi.c +++ b/sys/i386/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 +#ifndef SMP +#include +#endif #include #include #include diff --git a/sys/i386/isa/sio.c b/sys/i386/isa/sio.c index ae24d4c0a795..90049d04b5aa 100644 --- a/sys/i386/isa/sio.c +++ b/sys/i386/isa/sio.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)com.c 7.5 (Berkeley) 5/16/91 - * $Id: sio.c,v 1.220 1998/12/27 12:35:48 phk Exp $ + * $Id: sio.c,v 1.221 1999/01/07 14:14:23 yokota Exp $ */ #include "opt_comconsole.h" @@ -70,6 +70,9 @@ #include #include +#ifndef SMP +#include +#endif #include #include