summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/i386/conf/GENERIC5
-rw-r--r--sys/arch/i386/conf/Makefile.i3867
-rw-r--r--sys/arch/i386/conf/RAMDISK5
-rw-r--r--sys/arch/i386/conf/RAMDISKB5
-rw-r--r--sys/arch/i386/conf/RAMDISKC5
-rw-r--r--sys/arch/i386/conf/RAMDISK_CD5
-rw-r--r--sys/arch/i386/i386/cpu.c11
-rw-r--r--sys/arch/i386/i386/lock_machdep.c36
-rw-r--r--sys/arch/i386/i386/locore.s124
-rw-r--r--sys/arch/i386/i386/machdep.c23
-rw-r--r--sys/arch/i386/i386/pmap.c31
-rw-r--r--sys/arch/i386/include/endian.h12
-rw-r--r--sys/arch/i386/include/lock.h6
-rw-r--r--sys/arch/i386/include/pmap.h31
14 files changed, 33 insertions, 273 deletions
diff --git a/sys/arch/i386/conf/GENERIC b/sys/arch/i386/conf/GENERIC
index 10a8187e170..6e51d4f1e97 100644
--- a/sys/arch/i386/conf/GENERIC
+++ b/sys/arch/i386/conf/GENERIC
@@ -1,4 +1,4 @@
-# $OpenBSD: GENERIC,v 1.562 2007/05/28 23:50:23 beck Exp $
+# $OpenBSD: GENERIC,v 1.563 2007/05/29 18:18:19 tom Exp $
#
# For further information on compiling OpenBSD kernels, see the config(8)
# man page.
@@ -13,8 +13,7 @@ machine i386
include "../../../conf/GENERIC"
maxusers 32 # estimated number of users
-option I386_CPU # CPU classes; at least one is REQUIRED
-option I486_CPU
+option I486_CPU # CPU classes; at least one is REQUIRED
option I586_CPU
option I686_CPU
diff --git a/sys/arch/i386/conf/Makefile.i386 b/sys/arch/i386/conf/Makefile.i386
index 6f61d92eaa4..a5058be4b16 100644
--- a/sys/arch/i386/conf/Makefile.i386
+++ b/sys/arch/i386/conf/Makefile.i386
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.i386,v 1.45 2006/11/29 22:40:11 miod Exp $
+# $OpenBSD: Makefile.i386,v 1.46 2007/05/29 18:18:19 tom Exp $
# Makefile for OpenBSD
#
@@ -39,11 +39,6 @@ CDIAGFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
-Wno-uninitialized -Wno-format -Wno-main \
-Wstack-larger-than-2047
-.if !${IDENT:M-DI386_CPU}
-CMACHFLAGS= -march=i486
-.else
-CMACHFLAGS=
-.endif
.if ${IDENT:M-DNO_PROPOLICE}
CMACHFLAGS+= -fno-stack-protector
.endif
diff --git a/sys/arch/i386/conf/RAMDISK b/sys/arch/i386/conf/RAMDISK
index c32a4d3de3a..f44df65916b 100644
--- a/sys/arch/i386/conf/RAMDISK
+++ b/sys/arch/i386/conf/RAMDISK
@@ -1,12 +1,11 @@
-# $OpenBSD: RAMDISK,v 1.151 2007/05/28 03:12:38 krw Exp $
+# $OpenBSD: RAMDISK,v 1.152 2007/05/29 18:18:19 tom Exp $
machine i386 # architecture, used by config; REQUIRED
option SCSITERSE
option APM_NOPRINT
-option I386_CPU # CPU classes; at least one is REQUIRED
-option I486_CPU
+option I486_CPU # CPU classes; at least one is REQUIRED
option I586_CPU
option I686_CPU
diff --git a/sys/arch/i386/conf/RAMDISKB b/sys/arch/i386/conf/RAMDISKB
index 39e70ae6ea7..8c50c1e6f87 100644
--- a/sys/arch/i386/conf/RAMDISKB
+++ b/sys/arch/i386/conf/RAMDISKB
@@ -1,12 +1,11 @@
-# $OpenBSD: RAMDISKB,v 1.96 2007/05/28 03:12:38 krw Exp $
+# $OpenBSD: RAMDISKB,v 1.97 2007/05/29 18:18:19 tom Exp $
machine i386 # architecture, used by config; REQUIRED
option SCSITERSE
option APM_NOPRINT
-option I386_CPU # CPU classes; at least one is REQUIRED
-option I486_CPU
+option I486_CPU # CPU classes; at least one is REQUIRED
option I586_CPU
option I686_CPU
diff --git a/sys/arch/i386/conf/RAMDISKC b/sys/arch/i386/conf/RAMDISKC
index 858bc16e9c9..48dd78dab70 100644
--- a/sys/arch/i386/conf/RAMDISKC
+++ b/sys/arch/i386/conf/RAMDISKC
@@ -1,12 +1,11 @@
-# $OpenBSD: RAMDISKC,v 1.73 2007/05/28 03:12:38 krw Exp $
+# $OpenBSD: RAMDISKC,v 1.74 2007/05/29 18:18:19 tom Exp $
machine i386 # architecture, used by config; REQUIRED
option SCSITERSE
option APM_NOPRINT
-option I386_CPU # CPU classes; at least one is REQUIRED
-option I486_CPU
+option I486_CPU # CPU classes; at least one is REQUIRED
option I586_CPU
option I686_CPU
diff --git a/sys/arch/i386/conf/RAMDISK_CD b/sys/arch/i386/conf/RAMDISK_CD
index 5b89d0480d8..f8476b74cc7 100644
--- a/sys/arch/i386/conf/RAMDISK_CD
+++ b/sys/arch/i386/conf/RAMDISK_CD
@@ -1,12 +1,11 @@
-# $OpenBSD: RAMDISK_CD,v 1.139 2007/05/28 03:12:38 krw Exp $
+# $OpenBSD: RAMDISK_CD,v 1.140 2007/05/29 18:18:19 tom Exp $
machine i386 # architecture, used by config; REQUIRED
option SCSITERSE
option APM_NOPRINT
-option I386_CPU # CPU classes; at least one is REQUIRED
-option I486_CPU
+option I486_CPU # CPU classes; at least one is REQUIRED
option I586_CPU
option I686_CPU
diff --git a/sys/arch/i386/i386/cpu.c b/sys/arch/i386/i386/cpu.c
index 55661e9e738..726f3e816bb 100644
--- a/sys/arch/i386/i386/cpu.c
+++ b/sys/arch/i386/i386/cpu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.c,v 1.24 2007/05/26 22:09:17 weingart Exp $ */
+/* $OpenBSD: cpu.c,v 1.25 2007/05/29 18:18:20 tom Exp $ */
/* $NetBSD: cpu.c,v 1.1.2.7 2000/06/26 02:04:05 sommerfeld Exp $ */
/*-
@@ -331,13 +331,12 @@ cpu_init(struct cpu_info *ci)
if (ci->cpu_setup != NULL)
(*ci->cpu_setup)(ci);
-#if defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU)
/*
- * On a 486 or above, enable ring 0 write protection.
+ * Enable ring 0 write protection (486 or above, but 386
+ * no longer supported).
*/
- if (ci->cpu_class >= CPUCLASS_486)
- lcr0(rcr0() | CR0_WP);
-#endif
+ lcr0(rcr0() | CR0_WP);
+
if (cpu_feature & CPUID_PGE)
lcr4(rcr4() | CR4_PGE); /* enable global TLB caching */
diff --git a/sys/arch/i386/i386/lock_machdep.c b/sys/arch/i386/i386/lock_machdep.c
index d18663ca4aa..59c0ff96aff 100644
--- a/sys/arch/i386/i386/lock_machdep.c
+++ b/sys/arch/i386/i386/lock_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lock_machdep.c,v 1.5 2007/05/25 15:55:26 art Exp $ */
+/* $OpenBSD: lock_machdep.c,v 1.6 2007/05/29 18:18:20 tom Exp $ */
/* $NetBSD: lock_machdep.c,v 1.1.2.3 2000/05/03 14:40:30 sommerfeld Exp $ */
/*-
@@ -108,40 +108,6 @@ __cpu_simple_unlock(__cpu_simple_lock_t *lockp)
#endif
-int rw_cas_386(volatile unsigned long *, unsigned long, unsigned long);
-int rw_cas_486(volatile unsigned long *, unsigned long, unsigned long);
-int rw_cas_choose(volatile unsigned long *, unsigned long, unsigned long);
-
-int (*rw_cas_p)(volatile unsigned long *, unsigned long, unsigned long)
- = rw_cas_choose;
-
-int
-rw_cas_choose(volatile unsigned long *p, unsigned long o, unsigned long n)
-{
- if (cpu_class == CPUCLASS_386)
- rw_cas_p = rw_cas_386;
- else
- rw_cas_p = rw_cas_486;
-
- return (*rw_cas_p)(p, o, n);
-}
-
-int
-rw_cas_386(volatile unsigned long *p, unsigned long o, unsigned long n)
-{
- u_int ef = read_eflags();
-
- disable_intr();
- if (*p != o) {
- write_eflags(ef);
- return (1);
- }
- *p = n;
- write_eflags(ef);
-
- return (0);
-}
-
int
rw_cas_486(volatile unsigned long *p, unsigned long o, unsigned long n)
{
diff --git a/sys/arch/i386/i386/locore.s b/sys/arch/i386/i386/locore.s
index 11e9c946f05..559bf5d09d2 100644
--- a/sys/arch/i386/i386/locore.s
+++ b/sys/arch/i386/i386/locore.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.s,v 1.112 2007/05/27 21:35:36 tom Exp $ */
+/* $OpenBSD: locore.s,v 1.113 2007/05/29 18:18:20 tom Exp $ */
/* $NetBSD: locore.s,v 1.145 1996/05/03 19:41:19 christos Exp $ */
/*-
@@ -972,58 +972,6 @@ ENTRY(copyout)
cmpl $VM_MAXUSER_ADDRESS,%edx
ja _C_LABEL(copy_fault)
-#if defined(I386_CPU)
-#if defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU)
- cmpl $CPUCLASS_386,_C_LABEL(cpu_class)
- jne 3f
-#endif /* I486_CPU || I586_CPU || I686_CPU */
-
- testl %eax,%eax # anything to do?
- jz 3f
-
- /*
- * We have to check each PTE for (write) permission, since the CPU
- * doesn't do it for us.
- */
-
- /* Compute number of pages. */
- movl %edi,%ecx
- andl $PGOFSET,%ecx
- addl %eax,%ecx
- decl %ecx
- shrl $PGSHIFT,%ecx
-
- /* Compute PTE offset for start address. */
- shrl $PGSHIFT,%edi
-
- GET_CURPCB(%edx)
- movl $2f, PCB_ONFAULT(%edx)
-
-1: /* Check PTE for each page. */
- testb $PG_RW,_C_LABEL(PTmap)(,%edi,4)
- jz 2f
-
-4: incl %edi
- decl %ecx
- jns 1b
-
- movl 20+FPADD(%esp),%edi
- movl 24+FPADD(%esp),%eax
- jmp 3f
-
-2: /* Simulate a trap. */
- pushl %ecx
- movl %edi,%eax
- shll $PGSHIFT,%eax
- pushl %eax
- call _C_LABEL(trapwrite) # trapwrite(addr)
- addl $4,%esp # pop argument
- popl %ecx
- testl %eax,%eax # if not ok, return EFAULT
- jz 4b
- jmp _C_LABEL(copy_fault)
-#endif /* I386_CPU */
-
3: GET_CURPCB(%edx)
movl $_C_LABEL(copy_fault),PCB_ONFAULT(%edx)
@@ -1128,73 +1076,6 @@ ENTRY(copyoutstr)
movl 16+FPADD(%esp),%edi # edi = to
movl 20+FPADD(%esp),%edx # edx = maxlen
-#if defined(I386_CPU)
-#if defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU)
- cmpl $CPUCLASS_386,_C_LABEL(cpu_class)
- jne 5f
-#endif /* I486_CPU || I586_CPU || I686_CPU */
-
- /* Compute number of bytes in first page. */
- movl %edi,%eax
- andl $PGOFSET,%eax
- movl $NBPG,%ecx
- subl %eax,%ecx # ecx = NBPG - (src % NBPG)
-
- GET_CURPCB(%ecx)
- movl $6f, PCB_ONFAULT(%ecx)
-
-1: /*
- * Once per page, check that we are still within the bounds of user
- * space, and check for a write fault.
- */
- cmpl $VM_MAXUSER_ADDRESS,%edi
- jae _C_LABEL(copystr_fault)
-
- /* Compute PTE offset for start address. */
- movl %edi,%eax
- shrl $PGSHIFT,%eax # calculate pte address
-
- testb $PG_RW,_C_LABEL(PTmap)(,%eax,4)
- jnz 2f
-
-6: /* Simulate a trap. */
- pushl %edx
- pushl %edi
- call _C_LABEL(trapwrite) # trapwrite(addr)
- addl $4,%esp # clear argument from stack
- popl %edx
- testl %eax,%eax
- jnz _C_LABEL(copystr_fault)
-
-2: /* Copy up to end of this page. */
- subl %ecx,%edx # predecrement total count
- jnc 3f
- addl %edx,%ecx # ecx += (edx - ecx) = edx
- xorl %edx,%edx
-
-3: decl %ecx
- js 4f
- lodsb
- stosb
- testb %al,%al
- jnz 3b
-
- /* Success -- 0 byte reached. */
- addl %ecx,%edx # add back residual for this page
- xorl %eax,%eax
- jmp copystr_return
-
-4: /* Go to next page, if any. */
- movl $NBPG,%ecx
- testl %edx,%edx
- jnz 1b
-
- /* edx is zero -- return ENAMETOOLONG. */
- movl $ENAMETOOLONG,%eax
- jmp copystr_return
-#endif /* I386_CPU */
-
-#if defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU)
5: GET_CURPCB(%eax)
movl $_C_LABEL(copystr_fault),PCB_ONFAULT(%eax)
/*
@@ -1229,7 +1110,6 @@ ENTRY(copyoutstr)
jae _C_LABEL(copystr_fault)
movl $ENAMETOOLONG,%eax
jmp copystr_return
-#endif /* I486_CPU || I586_CPU || I686_CPU */
/*
* copyinstr(caddr_t from, caddr_t to, size_t maxlen, size_t *lencopied);
@@ -2150,7 +2030,7 @@ ENTRY(bzero)
stosb
#if defined(I486_CPU)
-#if defined(I386_CPU) || defined(I586_CPU) || defined(I686_CPU)
+#if defined(I586_CPU) || defined(I686_CPU)
cmpl $CPUCLASS_486,_C_LABEL(cpu_class)
jne 8f
#endif
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c
index fe574ef39cd..225aca3a3c6 100644
--- a/sys/arch/i386/i386/machdep.c
+++ b/sys/arch/i386/i386/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.394 2007/05/27 21:33:25 tom Exp $ */
+/* $OpenBSD: machdep.c,v 1.395 2007/05/29 18:18:20 tom Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
@@ -337,7 +337,6 @@ void p4_update_cpuspeed(void);
void p3_update_cpuspeed(void);
int pentium_cpuspeed(int *);
-#if defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU)
static __inline u_char
cyrix_read_reg(u_char reg)
{
@@ -351,7 +350,6 @@ cyrix_write_reg(u_char reg, u_char data)
outb(0x22, reg);
outb(0x23, data);
}
-#endif
/*
* cpuid instruction. request in eax, result in eax, ebx, ecx, edx.
@@ -1188,7 +1186,6 @@ cyrix3_cpu_setup(struct cpu_info *ci)
void
cyrix6x86_cpu_setup(struct cpu_info *ci)
{
-#if defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU)
extern int clock_broken_latch;
switch ((ci->ci_signature >> 4) & 15) { /* model */
@@ -1217,7 +1214,6 @@ cyrix6x86_cpu_setup(struct cpu_info *ci)
printf("%s: TSC disabled\n", ci->ci_dev.dv_xname);
break;
}
-#endif
}
void
@@ -1734,7 +1730,7 @@ identifycpu(struct cpu_info *ci)
* let them know if that machine type isn't configured.
*/
switch (cpu_class) {
-#if !defined(I386_CPU) && !defined(I486_CPU) && !defined(I586_CPU) && !defined(I686_CPU)
+#if !defined(I486_CPU) && !defined(I586_CPU) && !defined(I686_CPU)
#error No CPU classes configured.
#endif
#ifndef I686_CPU
@@ -1758,17 +1754,10 @@ identifycpu(struct cpu_info *ci)
#ifndef I486_CPU
case CPUCLASS_486:
printf("NOTICE: this kernel does not support i486 CPU class\n");
-#ifdef I386_CPU
- printf("NOTICE: lowering CPU class to i386\n");
- cpu_class = CPUCLASS_386;
- break;
#endif
-#endif
-#ifndef I386_CPU
case CPUCLASS_386:
printf("NOTICE: this kernel does not support i386 CPU class\n");
panic("no appropriate CPU class available");
-#endif
default:
break;
}
@@ -1787,13 +1776,11 @@ identifycpu(struct cpu_info *ci)
#endif
}
-#if defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU)
/*
- * On a 486 or above, enable ring 0 write protection.
+ * Enable ring 0 write protection (486 or above, but 386
+ * no longer supported).
*/
- if (ci->cpu_class >= CPUCLASS_486)
- lcr0(rcr0() | CR0_WP);
-#endif
+ lcr0(rcr0() | CR0_WP);
#if defined(I686_CPU)
/*
diff --git a/sys/arch/i386/i386/pmap.c b/sys/arch/i386/i386/pmap.c
index 051a4f887f2..408d818d58d 100644
--- a/sys/arch/i386/i386/pmap.c
+++ b/sys/arch/i386/i386/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.114 2007/05/28 18:31:11 krw Exp $ */
+/* $OpenBSD: pmap.c,v 1.115 2007/05/29 18:18:20 tom Exp $ */
/* $NetBSD: pmap.c,v 1.91 2000/06/02 17:46:37 thorpej Exp $ */
/*
@@ -1812,8 +1812,7 @@ pmap_zero_page_uncached(paddr_t pa)
panic("pmap_zero_page_uncached: lock botch");
#endif
- *zpte = (pa & PG_FRAME) | PG_V | PG_RW | /* map in */
- ((cpu_class != CPUCLASS_386) ? PG_N : 0);
+ *zpte = (pa & PG_FRAME) | PG_V | PG_RW | PG_N; /* map in */
pmap_update_pg((vaddr_t)zerova); /* flush TLB */
pagezero(zerova, PAGE_SIZE); /* zero */
*zpte = 0; /* zap! */
@@ -2943,11 +2942,6 @@ pmap_tlb_shootpage(struct pmap *pm, vaddr_t va)
int wait = 0;
int mask = 0;
- if (cpu_class == CPUCLASS_386) {
- tlbflush();
- return;
- }
-
CPU_INFO_FOREACH(cii, ci) {
if (ci == self || !pmap_is_active(pm, ci->ci_cpuid) ||
!(ci->ci_flags & CPUF_RUNNING))
@@ -2986,11 +2980,6 @@ pmap_tlb_shootrange(struct pmap *pm, vaddr_t sva, vaddr_t eva)
int mask = 0;
vaddr_t va;
- if (cpu_class == CPUCLASS_386) {
- tlbflush();
- return;
- }
-
CPU_INFO_FOREACH(cii, ci) {
if (ci == self || !pmap_is_active(pm, ci->ci_cpuid) ||
!(ci->ci_flags & CPUF_RUNNING))
@@ -3030,11 +3019,6 @@ pmap_tlb_shoottlb(void)
int wait = 0;
int mask = 0;
- if (cpu_class == CPUCLASS_386) {
- tlbflush();
- return;
- }
-
CPU_INFO_FOREACH(cii, ci) {
if (ci == self || !(ci->ci_flags & CPUF_RUNNING))
continue;
@@ -3074,11 +3058,6 @@ pmap_tlb_shootwait(void)
void
pmap_tlb_shootpage(struct pmap *pm, vaddr_t va)
{
- if (cpu_class == CPUCLASS_386) {
- tlbflush();
- return;
- }
-
if (pmap_is_curpmap(pm))
pmap_update_pg(va);
@@ -3089,14 +3068,8 @@ pmap_tlb_shootrange(struct pmap *pm, vaddr_t sva, vaddr_t eva)
{
vaddr_t va;
- if (cpu_class == CPUCLASS_386) {
- tlbflush();
- return;
- }
-
for (va = sva; va < eva; va += PAGE_SIZE)
pmap_update_pg(va);
-
}
void
diff --git a/sys/arch/i386/include/endian.h b/sys/arch/i386/include/endian.h
index ad37919f31c..c9f05de0e8a 100644
--- a/sys/arch/i386/include/endian.h
+++ b/sys/arch/i386/include/endian.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: endian.h,v 1.14 2005/12/13 00:35:23 millert Exp $ */
+/* $OpenBSD: endian.h,v 1.15 2007/05/29 18:18:20 tom Exp $ */
/*-
* Copyright (c) 1997 Niklas Hallqvist. All rights reserved.
@@ -29,22 +29,12 @@
#ifdef __GNUC__
-#if defined(_KERNEL) && !defined(I386_CPU)
#define __swap32md(x) ({ \
u_int32_t __swap32md_x = (x); \
\
__asm ("bswap %1" : "+r" (__swap32md_x)); \
__swap32md_x; \
})
-#else
-#define __swap32md(x) ({ \
- u_int32_t __swap32md_x = (x); \
- \
- __asm ("rorw $8, %w1; rorl $16, %1; rorw $8, %w1" : \
- "+r" (__swap32md_x)); \
- __swap32md_x; \
-})
-#endif /* _KERNEL && !I386_CPU */
#define __swap64md(x) ({ \
u_int64_t __swap64md_x = (x); \
diff --git a/sys/arch/i386/include/lock.h b/sys/arch/i386/include/lock.h
index 172ed35fdf3..97a3af49cb3 100644
--- a/sys/arch/i386/include/lock.h
+++ b/sys/arch/i386/include/lock.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: lock.h,v 1.4 2007/05/04 12:58:41 art Exp $ */
+/* $OpenBSD: lock.h,v 1.5 2007/05/29 18:18:20 tom Exp $ */
/* $NetBSD: lock.h,v 1.1.2.2 2000/05/03 14:40:55 sommerfeld Exp $ */
/*-
@@ -118,8 +118,8 @@ __cpu_simple_unlock(__cpu_simple_lock_t *lockp)
#endif /* !LOCKDEBUG */
#ifdef _KERNEL
-extern int (*rw_cas_p)(volatile unsigned long *, unsigned long, unsigned long);
-#define rw_cas (*rw_cas_p)
+extern int rw_cas_486(volatile unsigned long *, unsigned long, unsigned long);
+#define rw_cas rw_cas_486
#endif
#endif /* _I386_LOCK_H_ */
diff --git a/sys/arch/i386/include/pmap.h b/sys/arch/i386/include/pmap.h
index 9f0ed360a1a..2dea716c572 100644
--- a/sys/arch/i386/include/pmap.h
+++ b/sys/arch/i386/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.46 2007/05/25 15:55:27 art Exp $ */
+/* $OpenBSD: pmap.h,v 1.47 2007/05/29 18:18:20 tom Exp $ */
/* $NetBSD: pmap.h,v 1.44 2000/04/24 17:18:18 thorpej Exp $ */
/*
@@ -374,8 +374,6 @@ static void pmap_protect(struct pmap *, vaddr_t,
vaddr_t, vm_prot_t);
void pmap_remove(struct pmap *, vaddr_t, vaddr_t);
boolean_t pmap_test_attrs(struct vm_page *, int);
-static void pmap_update_pg(vaddr_t);
-static void pmap_update_2pg(vaddr_t,vaddr_t);
void pmap_write_protect(struct pmap *, vaddr_t,
vaddr_t, vm_prot_t);
int pmap_exec_fixup(struct vm_map *, struct trapframe *,
@@ -409,36 +407,13 @@ boolean_t pmap_zero_page_uncached(paddr_t);
* if hardware doesn't support one-page flushing)
*/
-__inline static void
-pmap_update_pg(va)
- vaddr_t va;
-{
-#if defined(I386_CPU)
- if (cpu_class == CPUCLASS_386)
- tlbflush();
- else
-#endif
- invlpg((u_int) va);
-}
+#define pmap_update_pg(va) invlpg((u_int)(va))
/*
* pmap_update_2pg: flush two pages from the TLB
*/
-__inline static void
-pmap_update_2pg(va, vb)
- vaddr_t va, vb;
-{
-#if defined(I386_CPU)
- if (cpu_class == CPUCLASS_386)
- tlbflush();
- else
-#endif
- {
- invlpg((u_int) va);
- invlpg((u_int) vb);
- }
-}
+#define pmap_update_2pg(va, vb) { invlpg((u_int)(va)); invlpg((u_int)(vb)); }
/*
* pmap_page_protect: change the protection of all recorded mappings