summaryrefslogtreecommitdiff
path: root/sys/arch/mvme88k
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2004-01-02 17:08:59 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2004-01-02 17:08:59 +0000
commit72d285c2021bf23bd1be2b14c823113c8df15033 (patch)
tree69f85154617073945a94c45706fa9a25a0d01dbf /sys/arch/mvme88k
parent6a627e636e0e1685779b837110bc4d71f9aec5bb (diff)
When both cmmu_dofoo() and cmmu_remote_dofoo() exist, kill the first one,
and rename the second one to the first one, i.e. have the cmmu_dofoo() functions always take a cpu# parameter. No functional change, simply makes code more readable and saves a few call frames.
Diffstat (limited to 'sys/arch/mvme88k')
-rw-r--r--sys/arch/mvme88k/ddb/db_interface.c4
-rw-r--r--sys/arch/mvme88k/include/cmmu.h30
-rw-r--r--sys/arch/mvme88k/mvme88k/m88110.c70
-rw-r--r--sys/arch/mvme88k/mvme88k/m8820x.c72
-rw-r--r--sys/arch/mvme88k/mvme88k/machdep.c4
-rw-r--r--sys/arch/mvme88k/mvme88k/pmap.c18
-rw-r--r--sys/arch/mvme88k/mvme88k/vm_machdep.c7
7 files changed, 52 insertions, 153 deletions
diff --git a/sys/arch/mvme88k/ddb/db_interface.c b/sys/arch/mvme88k/ddb/db_interface.c
index f93b63afc58..fc725af659e 100644
--- a/sys/arch/mvme88k/ddb/db_interface.c
+++ b/sys/arch/mvme88k/ddb/db_interface.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_interface.c,v 1.33 2003/12/21 13:23:32 miod Exp $ */
+/* $OpenBSD: db_interface.c,v 1.34 2004/01/02 17:08:55 miod Exp $ */
/*
* Mach Operating System
* Copyright (c) 1993-1991 Carnegie Mellon University
@@ -553,7 +553,7 @@ db_write_bytes(db_addr_t addr, size_t size, char *data)
}
/* XXX test return value */
pmap_extract(pmap_kernel(), (vaddr_t)addr, &physaddr);
- cmmu_flush_cache(physaddr, psize);
+ cmmu_flush_cache(cpu_number(), physaddr, psize);
}
/* to print a character to the console */
diff --git a/sys/arch/mvme88k/include/cmmu.h b/sys/arch/mvme88k/include/cmmu.h
index 8fcb2a89e2b..d44dd0f4922 100644
--- a/sys/arch/mvme88k/include/cmmu.h
+++ b/sys/arch/mvme88k/include/cmmu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmmu.h,v 1.15 2003/11/09 00:32:00 miod Exp $ */
+/* $OpenBSD: cmmu.h,v 1.16 2004/01/02 17:08:57 miod Exp $ */
/*
* Mach Operating System
* Copyright (c) 1993-1992 Carnegie Mellon University
@@ -59,19 +59,15 @@ struct cmmu_p {
void (*cmmu_shutdown_now_func)(void);
void (*cmmu_parity_enable_func)(void);
unsigned (*cmmu_cpu_number_func)(void);
- void (*cmmu_remote_set_sapr_func)(unsigned, unsigned);
+ void (*cmmu_set_sapr_func)(unsigned, unsigned);
void (*cmmu_set_uapr_func)(unsigned);
void (*cmmu_set_pair_batc_entry_func)(unsigned, unsigned, unsigned);
- void (*cmmu_flush_remote_tlb_func)(unsigned, unsigned, vaddr_t, vsize_t);
- void (*cmmu_flush_tlb_func)(unsigned, vaddr_t, vsize_t);
+ void (*cmmu_flush_tlb_func)(unsigned, unsigned, vaddr_t, vsize_t);
void (*cmmu_pmap_activate_func)(unsigned, unsigned,
u_int32_t i_batc[BATC_MAX], u_int32_t d_batc[BATC_MAX]);
- void (*cmmu_flush_remote_cache_func)(int, paddr_t, psize_t);
- void (*cmmu_flush_cache_func)(paddr_t, psize_t);
- void (*cmmu_flush_remote_inst_cache_func)(int, paddr_t, psize_t);
- void (*cmmu_flush_inst_cache_func)(paddr_t, psize_t);
- void (*cmmu_flush_remote_data_cache_func)(int, paddr_t, psize_t);
- void (*cmmu_flush_data_cache_func)(paddr_t, psize_t);
+ void (*cmmu_flush_cache_func)(int, paddr_t, psize_t);
+ void (*cmmu_flush_inst_cache_func)(int, paddr_t, psize_t);
+ void (*cmmu_flush_data_cache_func)(int, paddr_t, psize_t);
void (*dma_cachectl_func)(vaddr_t, vsize_t, int);
/* DDB only */
void (*cmmu_dump_config_func)(void);
@@ -90,18 +86,14 @@ extern struct cmmu_p *cmmu;
#define cmmu_shutdown_now (cmmu->cmmu_shutdown_now_func)
#define cmmu_parity_enable (cmmu->cmmu_parity_enable_func)
#define cmmu_cpu_number (cmmu->cmmu_cpu_number_func)
-#define cmmu_remote_set_sapr(a, b) (cmmu->cmmu_remote_set_sapr_func)(a, b)
+#define cmmu_set_sapr(a, b) (cmmu->cmmu_set_sapr_func)(a, b)
#define cmmu_set_uapr(a) (cmmu->cmmu_set_uapr_func)(a)
#define cmmu_set_pair_batc_entry(a, b, c) (cmmu->cmmu_set_pair_batc_entry_func)(a, b, c)
-#define cmmu_flush_remote_tlb(a, b, c, d) (cmmu->cmmu_flush_remote_tlb_func)(a, b, c, d)
-#define cmmu_flush_tlb(a, b, c) (cmmu->cmmu_flush_tlb_func)(a, b, c)
+#define cmmu_flush_tlb(a, b, c, d) (cmmu->cmmu_flush_tlb_func)(a, b, c, d)
#define cmmu_pmap_activate(a, b, c, d) (cmmu->cmmu_pmap_activate_func)(a, b, c, d)
-#define cmmu_flush_remote_cache(a, b, c) (cmmu->cmmu_flush_remote_cache_func)(a, b, c)
-#define cmmu_flush_cache(a, b) (cmmu->cmmu_flush_cache_func)(a, b)
-#define cmmu_flush_remote_inst_cache(a, b, c) (cmmu->cmmu_flush_remote_inst_cache_func)(a, b, c)
-#define cmmu_flush_inst_cache(a, b) (cmmu->cmmu_flush_inst_cache_func)(a, b)
-#define cmmu_flush_remote_data_cache(a, b, c) (cmmu->cmmu_flush_remote_data_cache_func)(a, b, c)
-#define cmmu_flush_data_cache(a, b) (cmmu->cmmu_flush_data_cache_func)(a, b)
+#define cmmu_flush_cache(a, b, c) (cmmu->cmmu_flush_cache_func)(a, b, c)
+#define cmmu_flush_inst_cache(a, b, c) (cmmu->cmmu_flush_inst_cache_func)(a, b, c)
+#define cmmu_flush_data_cache(a, b, c) (cmmu->cmmu_flush_data_cache_func)(a, b, c)
#define dma_cachectl(a, b, c) (cmmu->dma_cachectl_func)(a, b, c)
#define cmmu_dump_config (cmmu->cmmu_dump_config_func)
#define cmmu_show_translation(a, b, c, d) (cmmu->cmmu_show_translation_func)(a, b, c, d)
diff --git a/sys/arch/mvme88k/mvme88k/m88110.c b/sys/arch/mvme88k/mvme88k/m88110.c
index c3f2943a77e..c1cf9752b4d 100644
--- a/sys/arch/mvme88k/mvme88k/m88110.c
+++ b/sys/arch/mvme88k/mvme88k/m88110.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: m88110.c,v 1.12 2003/12/22 20:10:23 miod Exp $ */
+/* $OpenBSD: m88110.c,v 1.13 2004/01/02 17:08:57 miod Exp $ */
/*
* Copyright (c) 1998 Steve Murphree, Jr.
* All rights reserved.
@@ -95,19 +95,15 @@ void m88110_cpu_configuration_print(int);
void m88110_cmmu_shutdown_now(void);
void m88110_cmmu_parity_enable(void);
unsigned m88110_cmmu_cpu_number(void);
-void m88110_cmmu_remote_set_sapr(unsigned, unsigned);
+void m88110_cmmu_set_sapr(unsigned, unsigned);
void m88110_cmmu_set_uapr(unsigned);
void m88110_cmmu_set_pair_batc_entry(unsigned, unsigned, unsigned);
-void m88110_cmmu_flush_remote_tlb(unsigned, unsigned, vaddr_t, vsize_t);
-void m88110_cmmu_flush_tlb(unsigned, vaddr_t, vsize_t);
+void m88110_cmmu_flush_tlb(unsigned, unsigned, vaddr_t, vsize_t);
void m88110_cmmu_pmap_activate(unsigned, unsigned,
u_int32_t i_batc[BATC_MAX], u_int32_t d_batc[BATC_MAX]);
-void m88110_cmmu_flush_remote_cache(int, paddr_t, psize_t);
-void m88110_cmmu_flush_cache(paddr_t, psize_t);
-void m88110_cmmu_flush_remote_inst_cache(int, paddr_t, psize_t);
-void m88110_cmmu_flush_inst_cache(paddr_t, psize_t);
-void m88110_cmmu_flush_remote_data_cache(int, paddr_t, psize_t);
-void m88110_cmmu_flush_data_cache(paddr_t, psize_t);
+void m88110_cmmu_flush_cache(int, paddr_t, psize_t);
+void m88110_cmmu_flush_inst_cache(int, paddr_t, psize_t);
+void m88110_cmmu_flush_data_cache(int, paddr_t, psize_t);
void m88110_dma_cachectl(vaddr_t, vsize_t, int);
void m88110_cmmu_dump_config(void);
void m88110_cmmu_show_translation(unsigned, unsigned, unsigned, int);
@@ -121,17 +117,13 @@ struct cmmu_p cmmu88110 = {
m88110_cmmu_shutdown_now,
m88110_cmmu_parity_enable,
m88110_cmmu_cpu_number,
- m88110_cmmu_remote_set_sapr,
+ m88110_cmmu_set_sapr,
m88110_cmmu_set_uapr,
m88110_cmmu_set_pair_batc_entry,
- m88110_cmmu_flush_remote_tlb,
m88110_cmmu_flush_tlb,
m88110_cmmu_pmap_activate,
- m88110_cmmu_flush_remote_cache,
m88110_cmmu_flush_cache,
- m88110_cmmu_flush_remote_inst_cache,
m88110_cmmu_flush_inst_cache,
- m88110_cmmu_flush_remote_data_cache,
m88110_cmmu_flush_data_cache,
m88110_dma_cachectl,
#ifdef DDB
@@ -316,7 +308,7 @@ m88110_cmmu_cpu_number(void)
}
void
-m88110_cmmu_remote_set_sapr(unsigned cpu, unsigned ap)
+m88110_cmmu_set_sapr(unsigned cpu, unsigned ap)
{
unsigned ictl, dctl;
@@ -391,7 +383,7 @@ m88110_cmmu_set_pair_batc_entry(unsigned cpu, unsigned entry_no, unsigned value)
* Some functionality mimiced in m88110_cmmu_pmap_activate.
*/
void
-m88110_cmmu_flush_remote_tlb(unsigned cpu, unsigned kernel, vaddr_t vaddr,
+m88110_cmmu_flush_tlb(unsigned cpu, unsigned kernel, vaddr_t vaddr,
vsize_t size)
{
int s = splhigh(); /* XXX really disable interrupts? */
@@ -410,17 +402,6 @@ m88110_cmmu_flush_remote_tlb(unsigned cpu, unsigned kernel, vaddr_t vaddr,
}
/*
- * flush my personal tlb
- */
-void
-m88110_cmmu_flush_tlb(unsigned kernel, vaddr_t vaddr, vsize_t size)
-{
- int cpu = cpu_number();
-
- m88110_cmmu_flush_remote_tlb(cpu, kernel, vaddr, size);
-}
-
-/*
* New fast stuff for pmap_activate.
* Does what a few calls used to do.
* Only called from pmap.c's pmap_activate().
@@ -476,7 +457,7 @@ m88110_cmmu_pmap_activate(unsigned cpu, unsigned uapr,
* flush both Instruction and Data caches
*/
void
-m88110_cmmu_flush_remote_cache(int cpu, paddr_t physaddr, psize_t size)
+m88110_cmmu_flush_cache(int cpu, paddr_t physaddr, psize_t size)
{
int s = splhigh(); /* XXX really disable interrupts? */
@@ -488,21 +469,10 @@ m88110_cmmu_flush_remote_cache(int cpu, paddr_t physaddr, psize_t size)
}
/*
- * flush both Instruction and Data caches
- */
-void
-m88110_cmmu_flush_cache(paddr_t physaddr, psize_t size)
-{
- int cpu = cpu_number();
-
- m88110_cmmu_flush_remote_cache(cpu, physaddr, size);
-}
-
-/*
* flush Instruction caches
*/
void
-m88110_cmmu_flush_remote_inst_cache(int cpu, paddr_t physaddr, psize_t size)
+m88110_cmmu_flush_inst_cache(int cpu, paddr_t physaddr, psize_t size)
{
int s = splhigh(); /* XXX really disable interrupts? */
@@ -510,19 +480,11 @@ m88110_cmmu_flush_remote_inst_cache(int cpu, paddr_t physaddr, psize_t size)
splx(s);
}
-void
-m88110_cmmu_flush_inst_cache(paddr_t physaddr, psize_t size)
-{
- int cpu = cpu_number();
-
- m88110_cmmu_flush_remote_inst_cache(cpu, physaddr, size);
-}
-
/*
* flush data cache
*/
void
-m88110_cmmu_flush_remote_data_cache(int cpu, paddr_t physaddr, psize_t size)
+m88110_cmmu_flush_data_cache(int cpu, paddr_t physaddr, psize_t size)
{
int s = splhigh(); /* XXX really disable interrupts? */
@@ -532,14 +494,6 @@ m88110_cmmu_flush_remote_data_cache(int cpu, paddr_t physaddr, psize_t size)
splx(s);
}
-void
-m88110_cmmu_flush_data_cache(paddr_t physaddr, psize_t size)
-{
- int cpu = cpu_number();
-
- m88110_cmmu_flush_remote_data_cache(cpu, physaddr, size);
-}
-
/*
* sync dcache (and icache too)
*/
diff --git a/sys/arch/mvme88k/mvme88k/m8820x.c b/sys/arch/mvme88k/mvme88k/m8820x.c
index d52ee067428..75a92234f25 100644
--- a/sys/arch/mvme88k/mvme88k/m8820x.c
+++ b/sys/arch/mvme88k/mvme88k/m8820x.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: m8820x.c,v 1.25 2003/12/22 20:10:23 miod Exp $ */
+/* $OpenBSD: m8820x.c,v 1.26 2004/01/02 17:08:57 miod Exp $ */
/*
* Copyright (c) 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -107,19 +107,15 @@ void m8820x_cpu_configuration_print(int);
void m8820x_cmmu_shutdown_now(void);
void m8820x_cmmu_parity_enable(void);
unsigned m8820x_cmmu_cpu_number(void);
-void m8820x_cmmu_remote_set_sapr(unsigned, unsigned);
+void m8820x_cmmu_set_sapr(unsigned, unsigned);
void m8820x_cmmu_set_uapr(unsigned);
void m8820x_cmmu_set_pair_batc_entry(unsigned, unsigned, unsigned);
-void m8820x_cmmu_flush_remote_tlb(unsigned, unsigned, vaddr_t, vsize_t);
-void m8820x_cmmu_flush_tlb(unsigned, vaddr_t, vsize_t);
+void m8820x_cmmu_flush_tlb(unsigned, unsigned, vaddr_t, vsize_t);
void m8820x_cmmu_pmap_activate(unsigned, unsigned,
u_int32_t i_batc[BATC_MAX], u_int32_t d_batc[BATC_MAX]);
-void m8820x_cmmu_flush_remote_cache(int, paddr_t, psize_t);
-void m8820x_cmmu_flush_cache(paddr_t, psize_t);
-void m8820x_cmmu_flush_remote_inst_cache(int, paddr_t, psize_t);
-void m8820x_cmmu_flush_inst_cache(paddr_t, psize_t);
-void m8820x_cmmu_flush_remote_data_cache(int, paddr_t, psize_t);
-void m8820x_cmmu_flush_data_cache(paddr_t, psize_t);
+void m8820x_cmmu_flush_cache(int, paddr_t, psize_t);
+void m8820x_cmmu_flush_inst_cache(int, paddr_t, psize_t);
+void m8820x_cmmu_flush_data_cache(int, paddr_t, psize_t);
void m8820x_dma_cachectl(vaddr_t, vsize_t, int);
void m8820x_cmmu_dump_config(void);
void m8820x_cmmu_show_translation(unsigned, unsigned, unsigned, int);
@@ -133,17 +129,13 @@ struct cmmu_p cmmu8820x = {
m8820x_cmmu_shutdown_now,
m8820x_cmmu_parity_enable,
m8820x_cmmu_cpu_number,
- m8820x_cmmu_remote_set_sapr,
+ m8820x_cmmu_set_sapr,
m8820x_cmmu_set_uapr,
m8820x_cmmu_set_pair_batc_entry,
- m8820x_cmmu_flush_remote_tlb,
m8820x_cmmu_flush_tlb,
m8820x_cmmu_pmap_activate,
- m8820x_cmmu_flush_remote_cache,
m8820x_cmmu_flush_cache,
- m8820x_cmmu_flush_remote_inst_cache,
m8820x_cmmu_flush_inst_cache,
- m8820x_cmmu_flush_remote_data_cache,
m8820x_cmmu_flush_data_cache,
m8820x_dma_cachectl,
#ifdef DDB
@@ -1009,7 +1001,7 @@ m8820x_cmmu_cpu_number()
}
void
-m8820x_cmmu_remote_set_sapr(cpu, ap)
+m8820x_cmmu_set_sapr(cpu, ap)
unsigned cpu, ap;
{
CMMU_LOCK;
@@ -1070,7 +1062,7 @@ m8820x_cmmu_set_pair_batc_entry(cpu, entry_no, value)
* Some functionality mimiced in m8820x_cmmu_pmap_activate.
*/
void
-m8820x_cmmu_flush_remote_tlb(unsigned cpu, unsigned kernel, vaddr_t vaddr,
+m8820x_cmmu_flush_tlb(unsigned cpu, unsigned kernel, vaddr_t vaddr,
vsize_t size)
{
int s = splhigh();
@@ -1105,16 +1097,6 @@ m8820x_cmmu_flush_remote_tlb(unsigned cpu, unsigned kernel, vaddr_t vaddr,
}
/*
- * flush my personal tlb
- */
-void
-m8820x_cmmu_flush_tlb(unsigned kernel, vaddr_t vaddr, vsize_t size)
-{
- int cpu = cpu_number();
- m8820x_cmmu_flush_remote_tlb(cpu, kernel, vaddr, size);
-}
-
-/*
* New fast stuff for pmap_activate.
* Does what a few calls used to do.
* Only called from pmap_activate().
@@ -1175,7 +1157,7 @@ m8820x_cmmu_pmap_activate(cpu, uapr, i_batc, d_batc)
* flush both Instruction and Data caches
*/
void
-m8820x_cmmu_flush_remote_cache(int cpu, paddr_t physaddr, psize_t size)
+m8820x_cmmu_flush_cache(int cpu, paddr_t physaddr, psize_t size)
{
int s = splhigh();
CMMU_LOCK;
@@ -1210,20 +1192,10 @@ m8820x_cmmu_flush_remote_cache(int cpu, paddr_t physaddr, psize_t size)
}
/*
- * flush both Instruction and Data caches
- */
-void
-m8820x_cmmu_flush_cache(paddr_t physaddr, psize_t size)
-{
- int cpu = cpu_number();
- m8820x_cmmu_flush_remote_cache(cpu, physaddr, size);
-}
-
-/*
* flush Instruction caches
*/
void
-m8820x_cmmu_flush_remote_inst_cache(int cpu, paddr_t physaddr, psize_t size)
+m8820x_cmmu_flush_inst_cache(int cpu, paddr_t physaddr, psize_t size)
{
int s = splhigh();
CMMU_LOCK;
@@ -1257,18 +1229,8 @@ m8820x_cmmu_flush_remote_inst_cache(int cpu, paddr_t physaddr, psize_t size)
splx(s);
}
-/*
- * flush Instruction caches
- */
-void
-m8820x_cmmu_flush_inst_cache(paddr_t physaddr, psize_t size)
-{
- int cpu = cpu_number();
- m8820x_cmmu_flush_remote_inst_cache(cpu, physaddr, size);
-}
-
void
-m8820x_cmmu_flush_remote_data_cache(int cpu, paddr_t physaddr, psize_t size)
+m8820x_cmmu_flush_data_cache(int cpu, paddr_t physaddr, psize_t size)
{
int s = splhigh();
CMMU_LOCK;
@@ -1303,16 +1265,6 @@ m8820x_cmmu_flush_remote_data_cache(int cpu, paddr_t physaddr, psize_t size)
}
/*
- * flush data cache
- */
-void
-m8820x_cmmu_flush_data_cache(paddr_t physaddr, psize_t size)
-{
- int cpu = cpu_number();
- m8820x_cmmu_flush_remote_data_cache(cpu, physaddr, size);
-}
-
-/*
* sync dcache (and icache too)
*/
void
diff --git a/sys/arch/mvme88k/mvme88k/machdep.c b/sys/arch/mvme88k/mvme88k/machdep.c
index 3a5793191f7..5814a13279d 100644
--- a/sys/arch/mvme88k/mvme88k/machdep.c
+++ b/sys/arch/mvme88k/mvme88k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.123 2003/12/22 23:29:33 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.124 2004/01/02 17:08:57 miod Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -440,7 +440,7 @@ load_u_area(struct proc *p)
*t = p->p_md.md_upte[i];
va += NBPG;
}
- cmmu_flush_tlb(1, va, USPACE);
+ cmmu_flush_tlb(cpu_number(), 1, va, USPACE);
}
/*
diff --git a/sys/arch/mvme88k/mvme88k/pmap.c b/sys/arch/mvme88k/mvme88k/pmap.c
index 91e2e68c405..44a65933b12 100644
--- a/sys/arch/mvme88k/mvme88k/pmap.c
+++ b/sys/arch/mvme88k/mvme88k/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.100 2003/12/30 06:45:55 miod Exp $ */
+/* $OpenBSD: pmap.c,v 1.101 2004/01/02 17:08:58 miod Exp $ */
/*
* Copyright (c) 2001, 2002, 2003 Miodrag Vallat
* Copyright (c) 1998-2001 Steve Murphree, Jr.
@@ -316,7 +316,7 @@ flush_atc_entry(long users, vaddr_t va, boolean_t kernel)
while ((cpu = ff1(tusers)) != 32) {
if (cpu_sets[cpu]) { /* just checking to make sure */
- cmmu_flush_remote_tlb(cpu, kernel, va, PAGE_SIZE);
+ cmmu_flush_tlb(cpu, kernel, va, PAGE_SIZE);
}
tusers &= ~(1 << cpu);
}
@@ -645,7 +645,7 @@ pmap_cache_ctrl(pmap_t pmap, vaddr_t s, vaddr_t e, u_int mode)
pa = ptoa(PG_PFNUM(*pte));
for (cpu = 0; cpu < MAX_CPUS; cpu++)
if (cpu_sets[cpu])
- cmmu_flush_remote_cache(cpu, pa, PAGE_SIZE);
+ cmmu_flush_cache(cpu, pa, PAGE_SIZE);
}
PMAP_UNLOCK(pmap, spl);
}
@@ -1017,7 +1017,7 @@ pmap_bootstrap(vaddr_t load_start, paddr_t *phys_start, paddr_t *phys_end,
for (i = 0; i < MAX_CPUS; i++)
if (cpu_sets[i]) {
/* Invalidate entire kernel TLB. */
- cmmu_flush_remote_tlb(i, 1, 0, -1);
+ cmmu_flush_tlb(i, 1, 0, -1);
/* still physical */
/*
* Set valid bit to DT_INVALID so that the very first
@@ -1031,7 +1031,7 @@ pmap_bootstrap(vaddr_t load_start, paddr_t *phys_start, paddr_t *phys_end,
phys_map_vaddr2 + (i << PAGE_SHIFT));
invalidate_pte(pte);
/* Load supervisor pointer to segment table. */
- cmmu_remote_set_sapr(i, kernel_pmap->pm_apr);
+ cmmu_set_sapr(i, kernel_pmap->pm_apr);
#ifdef DEBUG
if ((pmap_con_dbg & (CD_BOOT | CD_FULL)) == (CD_BOOT | CD_FULL)) {
printf("Processor %d running virtual.\n", i);
@@ -1111,7 +1111,7 @@ pmap_zero_page(struct vm_page *pg)
SPLVM(spl);
- cmmu_flush_tlb(TRUE, va, PAGE_SIZE);
+ cmmu_flush_tlb(cpu, TRUE, va, PAGE_SIZE);
*pte = m88k_protection(kernel_pmap, VM_PROT_READ | VM_PROT_WRITE) |
CACHE_WT | CACHE_GLOBAL | PG_V | pa;
@@ -2360,7 +2360,7 @@ pmap_activate(struct proc *p)
*(register_t *)&batc_entry[n] = pmap->pm_ibatc[n].bits;
#else
cmmu_set_uapr(pmap->pm_apr);
- cmmu_flush_tlb(FALSE, 0, -1);
+ cmmu_flush_tlb(cpu, FALSE, 0, -1);
#endif /* PMAP_USE_BATC */
/*
@@ -2440,11 +2440,11 @@ pmap_copy_page(struct vm_page *srcpg, struct vm_page *dstpg)
SPLVM(spl);
- cmmu_flush_tlb(TRUE, srcva, PAGE_SIZE);
+ cmmu_flush_tlb(cpu, TRUE, srcva, PAGE_SIZE);
*srcpte = m88k_protection(kernel_pmap, VM_PROT_READ) |
CACHE_WT | CACHE_GLOBAL | PG_V | src;
- cmmu_flush_tlb(TRUE, dstva, PAGE_SIZE);
+ cmmu_flush_tlb(cpu, TRUE, dstva, PAGE_SIZE);
*dstpte = m88k_protection(kernel_pmap, VM_PROT_READ | VM_PROT_WRITE) |
CACHE_WT | CACHE_GLOBAL | PG_V | dst;
diff --git a/sys/arch/mvme88k/mvme88k/vm_machdep.c b/sys/arch/mvme88k/mvme88k/vm_machdep.c
index 1ea80bbb890..5ccd4fd0c6a 100644
--- a/sys/arch/mvme88k/mvme88k/vm_machdep.c
+++ b/sys/arch/mvme88k/mvme88k/vm_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_machdep.c,v 1.56 2003/11/17 14:48:20 miod Exp $ */
+/* $OpenBSD: vm_machdep.c,v 1.57 2004/01/02 17:08:58 miod Exp $ */
/*
* Copyright (c) 1998 Steve Murphree, Jr.
@@ -60,6 +60,7 @@
#include <machine/board.h>
#include <machine/cmmu.h>
#include <machine/cpu.h>
+#include <machine/cpu_number.h>
#include <machine/locore.h>
#include <machine/trap.h>
@@ -282,7 +283,7 @@ vmapbuf(bp, len)
* new pages get mapped in.
*/
- cmmu_flush_tlb(1, kva, len);
+ cmmu_flush_tlb(cpu_number(), 1, kva, len);
bp->b_data = (caddr_t)(kva + off);
while (len > 0) {
@@ -354,7 +355,7 @@ iomap_mapin(paddr_t pa, psize_t len, boolean_t canwait)
if (error != 0)
return NULL;
- cmmu_flush_tlb(1, iova, len);
+ cmmu_flush_tlb(cpu_number(), 1, iova, len); /* necessary? */
ppa = trunc_page(ppa);