Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/luna68k/luna68k Use explicit 68040 calls for cache ...



details:   https://anonhg.NetBSD.org/src/rev/c5206ad6e903
branches:  trunk
changeset: 480400:c5206ad6e903
user:      nisimura <nisimura%NetBSD.org@localhost>
date:      Tue Jan 11 08:24:14 2000 +0000

description:
Use explicit 68040 calls for cache manipulations.

diffstat:

 sys/arch/luna68k/luna68k/pmap.c        |  22 +++++++-------
 sys/arch/luna68k/luna68k/sys_machdep.c |  48 ++++++++++++++++++---------------
 sys/arch/luna68k/luna68k/trap.c        |   9 ++++--
 3 files changed, 43 insertions(+), 36 deletions(-)

diffs (235 lines):

diff -r a854c7a025f2 -r c5206ad6e903 sys/arch/luna68k/luna68k/pmap.c
--- a/sys/arch/luna68k/luna68k/pmap.c   Tue Jan 11 08:22:38 2000 +0000
+++ b/sys/arch/luna68k/luna68k/pmap.c   Tue Jan 11 08:24:14 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.1 2000/01/05 08:49:03 nisimura Exp $ */
+/* $NetBSD: pmap.c,v 1.2 2000/01/11 08:24:14 nisimura Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -1037,8 +1037,8 @@
                                if (isro && mmutype == MMU_68040) {
                                        paddr_t pa = pmap_pte_pa(pte);
 
-                                       DCFP(pa);
-                                       ICPP(pa);
+                                       DCFP_40(pa);
+                                       ICPP_40(pa);
                                }
 #endif
                                pmap_pte_set_prot(pte, isro);
@@ -1264,8 +1264,8 @@
        wired = ((*pte ^ npte) == PG_W);
 #if defined(M68040)
        if (mmutype == MMU_68040 && !wired) {
-               DCFP(pa);
-               ICPP(pa);
+               DCFP_40(pa);
+               ICPP_40(pa);
        }
 #endif
        *pte = npte;
@@ -1445,8 +1445,8 @@
 
        PMAP_DPRINTF(PDB_FOLLOW, ("pmap_update()\n"));
 
-#if (defined(M68020)||defined(M68040)||defined(M68060))
-       TBIA();
+#if defined(M68040)
+       TBIA_40();
 #endif
 }
 
@@ -1625,7 +1625,7 @@
 
        npte = phys | PG_V;
 
-#if defined(M68040) || defined(M68060)
+#if defined(M68040)
        if (mmutype == MMU_68040) {
                /*
                 * Set copyback caching on the page; this is required
@@ -1673,7 +1673,7 @@
        npte1 = src | PG_RO | PG_V;
        npte2 = dst | PG_V;
 
-#if defined(M68040) || defined(M68060)
+#if defined(M68040)
        if (mmutype == MMU_68040) {
                /*
                 * Set copyback caching on the pages; this is required
@@ -2160,8 +2160,8 @@
                                     (set & PG_CMASK) ||
                                     (mask & PG_CMASK) == 0)) {
                                        firstpage = FALSE;
-                                       DCFP(pa);
-                                       ICPP(pa);
+                                       DCFP_40(pa);
+                                       ICPP_40(pa);
                                }
 #endif
                                *pte = npte;
diff -r a854c7a025f2 -r c5206ad6e903 sys/arch/luna68k/luna68k/sys_machdep.c
--- a/sys/arch/luna68k/luna68k/sys_machdep.c    Tue Jan 11 08:22:38 2000 +0000
+++ b/sys/arch/luna68k/luna68k/sys_machdep.c    Tue Jan 11 08:24:14 2000 +0000
@@ -1,5 +1,4 @@
-/* $NetBSD: sys_machdep.c,v 1.1 2000/01/05 08:49:04 nisimura Exp $ */
-/*     $NetBSD: sys_machdep.c,v 1.1 2000/01/05 08:49:04 nisimura Exp $ */
+/* $NetBSD: sys_machdep.c,v 1.2 2000/01/11 08:24:14 nisimura Exp $ */
 
 /*
  * Copyright (c) 1982, 1986, 1993
@@ -38,7 +37,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: sys_machdep.c,v 1.1 2000/01/05 08:49:04 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_machdep.c,v 1.2 2000/01/11 08:24:14 nisimura Exp $");
 
 #include "opt_compat_hpux.h"
 
@@ -59,7 +58,8 @@
 #include <sys/syscallargs.h>
 
 #include <machine/cpu.h>
-#include <m68k/cacheops.h>
+#include <m68k/cacheops_30.h>
+#include <m68k/cacheops_40.h>
 
 #ifdef TRACE
 int    nvualarm;
@@ -151,11 +151,11 @@
 #if defined(M68040)
        if (mmutype == MMU_68040) {
                int inc = 0, doall = 0;
-               paddr_t pa = 0
+               paddr_t pa = 0;
                vaddr_t end;
 
                if (addr == 0 ||
-                   (req & ~CC_EXTPURGE) != CC_PURGE && len > 2*NBPG)
+                   ((req & ~CC_EXTPURGE) != CC_PURGE && len > 2*NBPG))
                        doall = 1;
 
                if (!doall) {
@@ -184,35 +184,35 @@
                        case CC_EXTPURGE|CC_IPURGE:
                        case CC_IPURGE:
                                if (doall) {
-                                       DCFA();
-                                       ICPA();
+                                       DCFA_40();
+                                       ICPA_40();
                                } else if (inc == 16) {
-                                       DCFL(pa);
-                                       ICPL(pa);
+                                       DCFL_40(pa);
+                                       ICPL_40(pa);
                                } else if (inc == NBPG) {
-                                       DCFP(pa);
-                                       ICPP(pa);
+                                       DCFP_40(pa);
+                                       ICPP_40(pa);
                                }
                                break;
                        
                        case CC_EXTPURGE|CC_PURGE:
                        case CC_PURGE:
                                if (doall)
-                                       DCFA(); /* note: flush not purge */
+                                       DCFA_40(); /* note: flush not purge */
                                else if (inc == 16)
-                                       DCPL(pa);
+                                       DCPL_40(pa);
                                else if (inc == NBPG)
-                                       DCPP(pa);
+                                       DCPP_40(pa);
                                break;
 
                        case CC_EXTPURGE|CC_FLUSH:
                        case CC_FLUSH:
                                if (doall)
-                                       DCFA();
+                                       DCFA_40();
                                else if (inc == 16)
-                                       DCFL(pa);
+                                       DCFL_40(pa);
                                else if (inc == NBPG)
-                                       DCFP(pa);
+                                       DCFP_40(pa);
                                break;
                                
                        default:
@@ -227,6 +227,10 @@
                return(error);
        }
 #endif
+/* see descriptions in <m68k/include/cacheops_30.h> */
+#define        DCIU()
+#define        DCIA()
+#define        ICIA() ICIA_30()
        switch (req) {
        case CC_EXTPURGE|CC_PURGE:
        case CC_EXTPURGE|CC_FLUSH:
@@ -279,11 +283,11 @@
                                pa = kvtop(addr);
                        }
                        if (inc == 16) {
-                               DCFL(pa);
-                               ICPL(pa);
+                               DCFL_40(pa);
+                               ICPL_40(pa);
                        } else {
-                               DCFP(pa);
-                               ICPP(pa);
+                               DCFP_40(pa);
+                               ICPP_40(pa);
                        }
                        pa += inc;
                        addr += inc;
diff -r a854c7a025f2 -r c5206ad6e903 sys/arch/luna68k/luna68k/trap.c
--- a/sys/arch/luna68k/luna68k/trap.c   Tue Jan 11 08:22:38 2000 +0000
+++ b/sys/arch/luna68k/luna68k/trap.c   Tue Jan 11 08:24:14 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.2 2000/01/07 09:09:35 nisimura Exp $ */
+/* $NetBSD: trap.c,v 1.3 2000/01/11 08:24:14 nisimura Exp $ */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -44,7 +44,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.2 2000/01/07 09:09:35 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.3 2000/01/11 08:24:14 nisimura Exp $");
 
 #include "opt_ddb.h"
 #include "opt_execfmt.h"
@@ -56,8 +56,10 @@
 #include <sys/proc.h>
 #include <sys/acct.h>
 #include <sys/kernel.h>
+#include <sys/signalvar.h>
 #include <sys/resourcevar.h>
 #include <sys/syscall.h>
+#include <sys/syslog.h>
 #include <sys/user.h>
 #ifdef KTRACE
 #include <sys/ktrace.h>
@@ -598,6 +600,7 @@
 }
 
 #ifdef M68040
+#include <m68k/cacheops_40.h>
 #ifdef DEBUG
 struct writebackstats {
        int calls;
@@ -668,7 +671,7 @@
                        fa = (u_int)&vmmap[(f->f_fa & PGOFSET) & ~0xF];
                        bcopy((caddr_t)&f->f_pd0, (caddr_t)fa, 16);
                        (void) pmap_extract(pmap_kernel(), (vaddr_t)fa, &pa);
-                       DCFL(pa);
+                       DCFL_40(pa);
                        pmap_remove(pmap_kernel(), (vaddr_t)vmmap,
                                    (vaddr_t)&vmmap[NBPG]);
                } else



Home | Main Index | Thread Index | Old Index