diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2007-11-22 05:47:47 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2007-11-22 05:47:47 +0000 |
commit | 1f742470619ba6b6bdbb1cbdcb26f2bdd8912f28 (patch) | |
tree | 91273344bec3e49e2ebd9b35b8fce30893c88f3a /sys/arch | |
parent | 75b6a0ed47c2ef6290f154fc534730367bdd28f2 (diff) |
Remove the cpu parameter from cmmu_set_sapr(), since it is only invoked
for the current processor. And remove now unused cmmu_flush_data_page().
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/m88k/include/cmmu.h | 8 | ||||
-rw-r--r-- | sys/arch/m88k/m88k/m8820x_machdep.c | 32 | ||||
-rw-r--r-- | sys/arch/m88k/m88k/pmap.c | 4 | ||||
-rw-r--r-- | sys/arch/mvme88k/mvme88k/m88110.c | 24 |
4 files changed, 13 insertions, 55 deletions
diff --git a/sys/arch/m88k/include/cmmu.h b/sys/arch/m88k/include/cmmu.h index e21d3dfc644..0d72d74be0a 100644 --- a/sys/arch/m88k/include/cmmu.h +++ b/sys/arch/m88k/include/cmmu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cmmu.h,v 1.18 2007/11/22 05:42:48 miod Exp $ */ +/* $OpenBSD: cmmu.h,v 1.19 2007/11/22 05:47:45 miod Exp $ */ /* * Mach Operating System * Copyright (c) 1993-1992 Carnegie Mellon University @@ -40,12 +40,11 @@ struct cmmu_p { void (*cpu_configuration_print)(int); void (*shutdown)(void); cpuid_t (*cpu_number)(void); - void (*set_sapr)(cpuid_t, apr_t); + void (*set_sapr)(apr_t); void (*set_uapr)(apr_t); void (*flush_tlb)(cpuid_t, u_int, vaddr_t, u_int); void (*flush_cache)(cpuid_t, paddr_t, psize_t); void (*flush_inst_cache)(cpuid_t, paddr_t, psize_t); - void (*flush_data_page)(cpuid_t, paddr_t); void (*dma_cachectl)(pmap_t, vaddr_t, vsize_t, int); void (*dma_cachectl_pa)(paddr_t, psize_t, int); #ifdef MULTIPROCESSOR @@ -60,12 +59,11 @@ extern struct cmmu_p *cmmu; #define cpu_configuration_print(a) (cmmu->cpu_configuration_print)(a) #define cmmu_shutdown (cmmu->shutdown) #define cmmu_cpu_number (cmmu->cpu_number) -#define cmmu_set_sapr(a, b) (cmmu->set_sapr)(a, b) +#define cmmu_set_sapr(a) (cmmu->set_sapr)(a) #define cmmu_set_uapr(a) (cmmu->set_uapr)(a) #define cmmu_flush_tlb(a, b, c, d) (cmmu->flush_tlb)(a, b, c, d) #define cmmu_flush_cache(a, b, c) (cmmu->flush_cache)(a, b, c) #define cmmu_flush_inst_cache(a, b, c) (cmmu->flush_inst_cache)(a, b, c) -#define cmmu_flush_data_page(a, b) (cmmu->flush_data_page)(a, b) #define dma_cachectl(a, b, c, d) (cmmu->dma_cachectl)(a, b, c, d) #define dma_cachectl_pa(a, b, c) (cmmu->dma_cachectl_pa)(a, b, c) #define cmmu_initialize_cpu(a) (cmmu->initialize_cpu)(a) diff --git a/sys/arch/m88k/m88k/m8820x_machdep.c b/sys/arch/m88k/m88k/m8820x_machdep.c index 54275cb2072..76f0ebc44b0 100644 --- a/sys/arch/m88k/m88k/m8820x_machdep.c +++ b/sys/arch/m88k/m88k/m8820x_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: m8820x_machdep.c,v 1.31 2007/11/22 05:42:50 miod Exp $ */ +/* $OpenBSD: m8820x_machdep.c,v 1.32 2007/11/22 05:47:46 miod Exp $ */ /* * Copyright (c) 2004, Miodrag Vallat. * @@ -96,12 +96,11 @@ cpuid_t m8820x_init(void); void m8820x_cpu_configuration_print(int); void m8820x_shutdown(void); -void m8820x_set_sapr(cpuid_t, apr_t); +void m8820x_set_sapr(apr_t); void m8820x_set_uapr(apr_t); void m8820x_flush_tlb(cpuid_t, u_int, vaddr_t, u_int); void m8820x_flush_cache(cpuid_t, paddr_t, psize_t); void m8820x_flush_inst_cache(cpuid_t, paddr_t, psize_t); -void m8820x_flush_data_page(cpuid_t, paddr_t); void m8820x_dma_cachectl(pmap_t, vaddr_t, vsize_t, int); void m8820x_dma_cachectl_pa(paddr_t, psize_t, int); void m8820x_initialize_cpu(cpuid_t); @@ -118,7 +117,6 @@ struct cmmu_p cmmu8820x = { m8820x_flush_tlb, m8820x_flush_cache, m8820x_flush_inst_cache, - m8820x_flush_data_page, m8820x_dma_cachectl, m8820x_dma_cachectl_pa, #ifdef MULTIPROCESSOR @@ -486,8 +484,10 @@ m8820x_shutdown() } void -m8820x_set_sapr(cpuid_t cpu, apr_t ap) +m8820x_set_sapr(apr_t ap) { + int cpu = cpu_number(); + CMMU_LOCK; m8820x_cmmu_set_reg(CMMU_SAPR, ap, 0, cpu, 0); @@ -538,12 +538,6 @@ m8820x_flush_tlb(cpuid_t cpu, unsigned kernel, vaddr_t vaddr, u_int count) kernel ? CMMU_FLUSH_SUPER_ALL : CMMU_FLUSH_USER_ALL, 0, cpu, 0); break; - case 3: - m8820x_cmmu_set_cmd( - kernel ? CMMU_FLUSH_SUPER_PAGE : CMMU_FLUSH_USER_PAGE, - ADDR_VAL, cpu, 0, vaddr); - vaddr += PAGE_SIZE; - /* FALLTHROUGH */ case 2: m8820x_cmmu_set_cmd( kernel ? CMMU_FLUSH_SUPER_PAGE : CMMU_FLUSH_USER_PAGE, @@ -648,22 +642,6 @@ m8820x_flush_inst_cache(cpuid_t cpu, paddr_t pa, psize_t size) set_psr(psr); } -void -m8820x_flush_data_page(cpuid_t cpu, paddr_t pa) -{ - u_int32_t psr; - - disable_interrupt(psr); - CMMU_LOCK; - - m8820x_cmmu_set_cmd(CMMU_FLUSH_CACHE_CBI_PAGE, - MODE_VAL /* | ADDR_VAL */, cpu, DATA_CMMU, pa); - m8820x_cmmu_wait(cpu); - - CMMU_UNLOCK; - set_psr(psr); -} - /* * sync dcache - icache is never dirty but needs to be invalidated as well. */ diff --git a/sys/arch/m88k/m88k/pmap.c b/sys/arch/m88k/m88k/pmap.c index 6c66bd1811a..4630714243c 100644 --- a/sys/arch/m88k/m88k/pmap.c +++ b/sys/arch/m88k/m88k/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.38 2007/11/22 05:46:07 miod Exp $ */ +/* $OpenBSD: pmap.c,v 1.39 2007/11/22 05:47:46 miod Exp $ */ /* * Copyright (c) 2001-2004, Miodrag Vallat * Copyright (c) 1998-2001 Steve Murphree, Jr. @@ -730,7 +730,7 @@ pmap_bootstrap_cpu(cpuid_t cpu) cmmu_flush_tlb(cpu, TRUE, 0, -1); /* Load supervisor pointer to segment table. */ - cmmu_set_sapr(cpu, kernel_pmap->pm_apr); + cmmu_set_sapr(kernel_pmap->pm_apr); #ifdef PMAPDEBUG printf("cpu%d: running virtual\n", cpu); #endif diff --git a/sys/arch/mvme88k/mvme88k/m88110.c b/sys/arch/mvme88k/mvme88k/m88110.c index 07d25ce16b9..a3116a62483 100644 --- a/sys/arch/mvme88k/mvme88k/m88110.c +++ b/sys/arch/mvme88k/mvme88k/m88110.c @@ -1,4 +1,4 @@ -/* $OpenBSD: m88110.c,v 1.41 2007/11/22 05:42:52 miod Exp $ */ +/* $OpenBSD: m88110.c,v 1.42 2007/11/22 05:47:46 miod Exp $ */ /* * Copyright (c) 1998 Steve Murphree, Jr. * All rights reserved. @@ -77,12 +77,11 @@ void m88110_setup_board_config(void); void m88110_cpu_configuration_print(int); void m88110_shutdown(void); cpuid_t m88110_cpu_number(void); -void m88110_set_sapr(cpuid_t, apr_t); +void m88110_set_sapr(apr_t); void m88110_set_uapr(apr_t); void m88110_flush_tlb(cpuid_t, u_int, vaddr_t, u_int); void m88110_flush_cache(cpuid_t, paddr_t, psize_t); void m88110_flush_inst_cache(cpuid_t, paddr_t, psize_t); -void m88110_flush_data_page(cpuid_t, paddr_t); void m88110_dma_cachectl(pmap_t, vaddr_t, vsize_t, int); void m88110_dma_cachectl_pa(paddr_t, psize_t, int); void m88110_initialize_cpu(cpuid_t); @@ -99,7 +98,6 @@ struct cmmu_p cmmu88110 = { m88110_flush_tlb, m88110_flush_cache, m88110_flush_inst_cache, - m88110_flush_data_page, m88110_dma_cachectl, m88110_dma_cachectl_pa, #ifdef MULTIPROCESSOR @@ -241,7 +239,7 @@ m88110_cpu_number(void) } void -m88110_set_sapr(cpuid_t cpu, apr_t ap) +m88110_set_sapr(apr_t ap) { u_int ictl, dctl; @@ -369,22 +367,6 @@ m88110_flush_inst_cache(cpuid_t cpu, paddr_t pa, psize_t size) } /* - * flush data cache - */ -void -m88110_flush_data_page(cpuid_t cpu, paddr_t pa) -{ - u_int32_t psr; - - disable_interrupt(psr); - - mc88110_flush_data(); - if (mc88410_present()) - mc88410_flush(); - set_psr(psr); -} - -/* * sync dcache (and icache too) */ void |