diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2004-01-09 00:23:09 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2004-01-09 00:23:09 +0000 |
commit | 66bbd0685a95885c1bc3ee90357512adeb1c0f8a (patch) | |
tree | 841c427747f3c48d4e5feec2c2db455009d5c496 /sys/arch | |
parent | 12e34d3ac8a045a05d890c02ff0d8aacadd0e66a (diff) |
Do not define new m8820x specific constants for what are common cache and
apr validity constants, really.
And get rid of the old cache_policy debug trick.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/mvme88k/include/cmmu.h | 3 | ||||
-rw-r--r-- | sys/arch/mvme88k/include/m8820x.h | 8 | ||||
-rw-r--r-- | sys/arch/mvme88k/mvme88k/cmmu.c | 3 | ||||
-rw-r--r-- | sys/arch/mvme88k/mvme88k/m8820x.c | 16 |
4 files changed, 10 insertions, 20 deletions
diff --git a/sys/arch/mvme88k/include/cmmu.h b/sys/arch/mvme88k/include/cmmu.h index d44dd0f4922..98a33c7b44b 100644 --- a/sys/arch/mvme88k/include/cmmu.h +++ b/sys/arch/mvme88k/include/cmmu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cmmu.h,v 1.16 2004/01/02 17:08:57 miod Exp $ */ +/* $OpenBSD: cmmu.h,v 1.17 2004/01/09 00:23:04 miod Exp $ */ /* * Mach Operating System * Copyright (c) 1993-1992 Carnegie Mellon University @@ -37,7 +37,6 @@ extern unsigned cpu_sets[MAX_CPUS]; extern int cpu_cmmu_ratio; extern unsigned master_cpu; -extern unsigned cache_policy; extern int max_cpus, max_cmmus; /* diff --git a/sys/arch/mvme88k/include/m8820x.h b/sys/arch/mvme88k/include/m8820x.h index cc95c8d76ff..6de52d7bc3e 100644 --- a/sys/arch/mvme88k/include/m8820x.h +++ b/sys/arch/mvme88k/include/m8820x.h @@ -1,4 +1,4 @@ -/* $OpenBSD: m8820x.h,v 1.9 2003/10/11 22:46:24 miod Exp $ */ +/* $OpenBSD: m8820x.h,v 1.10 2004/01/09 00:23:05 miod Exp $ */ /* * Mach Operating System * Copyright (c) 1993-1992 Carnegie Mellon University @@ -103,12 +103,6 @@ #define CMMU_PFSR_SUPER 6 /* supervisor violation */ #define CMMU_PFSR_WRITE 7 /* writer violation */ -/* Area Description */ -#define AREA_D_WT 0x00000200 /* write through */ -#define AREA_D_G 0x00000080 /* global */ -#define AREA_D_CI 0x00000040 /* cache inhibit */ -#define AREA_D_TE 0x00000001 /* translation enable */ - /* * Possible MVME188 board configurations */ diff --git a/sys/arch/mvme88k/mvme88k/cmmu.c b/sys/arch/mvme88k/mvme88k/cmmu.c index 2a00acc9df9..defd3f9012f 100644 --- a/sys/arch/mvme88k/mvme88k/cmmu.c +++ b/sys/arch/mvme88k/mvme88k/cmmu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmmu.c,v 1.24 2004/01/07 23:43:54 miod Exp $ */ +/* $OpenBSD: cmmu.c,v 1.25 2004/01/09 00:23:08 miod Exp $ */ /* * Copyright (c) 1998 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -71,7 +71,6 @@ */ struct simplelock cmmu_cpu_lock; -unsigned cache_policy = /*CACHE_INH*/ 0; unsigned cpu_sets[MAX_CPUS]; unsigned master_cpu = 0; int max_cpus, max_cmmus; diff --git a/sys/arch/mvme88k/mvme88k/m8820x.c b/sys/arch/mvme88k/mvme88k/m8820x.c index 8ab72ad6582..a5b548ae72e 100644 --- a/sys/arch/mvme88k/mvme88k/m8820x.c +++ b/sys/arch/mvme88k/mvme88k/m8820x.c @@ -1,4 +1,4 @@ -/* $OpenBSD: m8820x.c,v 1.27 2004/01/05 20:07:03 miod Exp $ */ +/* $OpenBSD: m8820x.c,v 1.28 2004/01/09 00:23:08 miod Exp $ */ /* * Copyright (c) 2001 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -848,8 +848,8 @@ m8820x_cmmu_init() cr->sctr &= ~(CMMU_SCTR_PE | CMMU_SCTR_SE | CMMU_SCTR_PR); cr->sapr = cr->uapr = - ((0x00000 << PG_BITS) | AREA_D_WT | AREA_D_G | - AREA_D_CI) & ~AREA_D_TE; + ((0x00000 << PG_BITS) | CACHE_WT | CACHE_GLOBAL | + CACHE_INH) & ~APR_V; #ifdef SHADOW_BATC m8820x_cmmu[cmmu_num].batc[0] = @@ -902,8 +902,8 @@ m8820x_cmmu_init() if (!cpu_sets[cpu]) continue; - tmp = ((0x00000 << PG_BITS) | AREA_D_WT | AREA_D_G) - & ~(AREA_D_CI | AREA_D_TE); + tmp = ((0x00000 << PG_BITS) | CACHE_WT | CACHE_GLOBAL) + & ~(CACHE_INH | APR_V); m8820x_cmmu_set(CMMU_SAPR, tmp, MODE_VAL, cpu, INST_CMMU, 0, 0); m8820x_cmmu_set(CMMU_SCR, CMMU_FLUSH_SUPER_ALL, @@ -928,8 +928,8 @@ m8820x_cmmu_shutdown_now() cr->sctr &= ~(CMMU_SCTR_PE | CMMU_SCTR_SE | CMMU_SCTR_PR); cr->sapr = cr->uapr = - ((0x00000 << PG_BITS) | AREA_D_CI) & - ~(AREA_D_WT | AREA_D_G | AREA_D_TE); + ((0x00000 << PG_BITS) | CACHE_INH) & + ~(CACHE_WT | CACHE_GLOBAL | APR_V); } CMMU_UNLOCK; } @@ -1006,8 +1006,6 @@ m8820x_cmmu_set_sapr(cpu, ap) unsigned cpu, ap; { CMMU_LOCK; - if (cache_policy & CACHE_INH) - ap |= AREA_D_CI; m8820x_cmmu_set(CMMU_SAPR, ap, ACCESS_VAL, cpu, 0, CMMU_ACS_SUPER, 0); CMMU_UNLOCK; } |