Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc/sparc * xcallintr(): use cpuinfo directly again.



details:   https://anonhg.NetBSD.org/src/rev/d7f967a81fc3
branches:  trunk
changeset: 540655:d7f967a81fc3
user:      pk <pk%NetBSD.org@localhost>
date:      Sat Dec 21 12:55:54 2002 +0000

description:
* xcallintr(): use cpuinfo directly again.
* nmi_soft(): remove most of the obsoleted requests.

diffstat:

 sys/arch/sparc/sparc/intr.c |  112 +++----------------------------------------
 1 files changed, 8 insertions(+), 104 deletions(-)

diffs (157 lines):

diff -r b0f91f8ba165 -r d7f967a81fc3 sys/arch/sparc/sparc/intr.c
--- a/sys/arch/sparc/sparc/intr.c       Sat Dec 21 12:52:58 2002 +0000
+++ b/sys/arch/sparc/sparc/intr.c       Sat Dec 21 12:55:54 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intr.c,v 1.67 2002/12/19 10:38:28 pk Exp $ */
+/*     $NetBSD: intr.c,v 1.68 2002/12/21 12:55:54 pk Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -279,9 +279,7 @@
                cpuinfo.ci_ddb_regs = &regs;
 #endif
                cpuinfo.flags |= CPUFLG_PAUSED|CPUFLG_GOTMSG;
-               while (cpuinfo.flags & CPUFLG_PAUSED)
-                       cpuinfo.sp_cache_flush((caddr_t)&cpuinfo.flags,
-                           sizeof(cpuinfo.flags), 0);
+               while (cpuinfo.flags & CPUFLG_PAUSED) /*void*/;
 #if defined(DDB)
                cpuinfo.ci_ddb_regs = 0;
 #endif
@@ -294,99 +292,6 @@
                p->retval = (*p->func)(p->arg0, p->arg1, p->arg2, p->arg3); 
                break;
            }
-       case XPMSG_VCACHE_FLUSH_PAGE:
-           {
-               volatile struct xpmsg_flush_page *p = &cpuinfo.msg.u.xpmsg_flush_page;
-               int ctx = getcontext();
-
-               setcontext(p->ctx);
-               cpuinfo.sp_vcache_flush_page(p->va, p->ctx);
-               setcontext(ctx);
-               break;
-           }
-       case XPMSG_VCACHE_FLUSH_SEGMENT:
-           {
-               volatile struct xpmsg_flush_segment *p = &cpuinfo.msg.u.xpmsg_flush_segment;
-               int ctx = getcontext();
-
-               setcontext(p->ctx);
-               cpuinfo.sp_vcache_flush_segment(p->vr, p->vs, p->ctx);
-               setcontext(ctx);
-               break;
-           }
-       case XPMSG_VCACHE_FLUSH_REGION:
-           {
-               volatile struct xpmsg_flush_region *p = &cpuinfo.msg.u.xpmsg_flush_region;
-               int ctx = getcontext();
-
-               setcontext(p->ctx);
-               cpuinfo.sp_vcache_flush_region(p->vr, p->ctx);
-               setcontext(ctx);
-               break;
-           }
-       case XPMSG_VCACHE_FLUSH_CONTEXT:
-           {
-               volatile struct xpmsg_flush_context *p = &cpuinfo.msg.u.xpmsg_flush_context;
-               int ctx = getcontext();
-
-               setcontext(p->ctx);
-               cpuinfo.sp_vcache_flush_context(p->ctx);
-               setcontext(ctx);
-               break;
-           }
-       case XPMSG_VCACHE_FLUSH_RANGE:
-           {
-               volatile struct xpmsg_flush_range *p = &cpuinfo.msg.u.xpmsg_flush_range;
-               int ctx = getcontext();
-
-               setcontext(p->ctx);
-               cpuinfo.sp_cache_flush(p->va, p->size, p->ctx);
-               setcontext(ctx);
-               break;
-           }
-       case XPMSG_DEMAP_TLB_PAGE:
-           {
-               volatile struct xpmsg_flush_page *p = &cpuinfo.msg.u.xpmsg_flush_page;
-               int ctx = getcontext();
-
-               setcontext(p->ctx);
-               tlb_flush_page_real(p->va);
-               setcontext(ctx);
-               break;
-           }
-       case XPMSG_DEMAP_TLB_SEGMENT:
-           {
-               volatile struct xpmsg_flush_segment *p = &cpuinfo.msg.u.xpmsg_flush_segment;
-               int ctx = getcontext();
-
-               setcontext(p->ctx);
-               tlb_flush_segment_real(p->vr, p->vs);
-               setcontext(ctx);
-               break;
-           }
-       case XPMSG_DEMAP_TLB_REGION:
-           {
-               volatile struct xpmsg_flush_region *p = &cpuinfo.msg.u.xpmsg_flush_region;
-               int ctx = getcontext();
-
-               setcontext(p->ctx);
-               tlb_flush_region_real(p->vr);
-               setcontext(ctx);
-               break;
-           }
-       case XPMSG_DEMAP_TLB_CONTEXT:
-           {
-               volatile struct xpmsg_flush_context *p = &cpuinfo.msg.u.xpmsg_flush_context;
-               int ctx = getcontext();
-
-               setcontext(p->ctx);
-               tlb_flush_context_real();
-               setcontext(ctx);
-               break;
-           }
-       case XPMSG_DEMAP_TLB_ALL:
-               tlb_flush_all_real();
-               break;
        }
        cpuinfo.flags |= CPUFLG_GOTMSG;
 #endif
@@ -398,9 +303,8 @@
  */
 static void xcallintr(void *v)
 {
-       struct cpu_info *cpi = cpus[cpuinfo.ci_cpuid];
 
-       switch (cpi->msg.tag) {
+       switch (cpuinfo.msg.tag) {
        case XPMSG_PAUSECPU:
            {
 #if defined(DDB)
@@ -409,12 +313,12 @@
 
                regs.db_tf = *tf;
                regs.db_fr = *(struct frame *)tf->tf_out[6];
-               cpi->ci_ddb_regs = &regs;
+               cpuinfo.ci_ddb_regs = &regs;
 #endif
-               cpi->flags |= CPUFLG_PAUSED|CPUFLG_GOTMSG;
-               while (cpi->flags & CPUFLG_PAUSED) /**/;
+               cpuinfo.flags |= CPUFLG_PAUSED|CPUFLG_GOTMSG;
+               while (cpuinfo.flags & CPUFLG_PAUSED) /**/;
 #if defined(DDB)
-               cpi->ci_ddb_regs = NULL;
+               cpuinfo.ci_ddb_regs = NULL;
 #endif
                return;
            }
@@ -427,7 +331,7 @@
                break;
            }
        }
-       cpi->flags |= CPUFLG_GOTMSG;
+       cpuinfo.flags |= CPUFLG_GOTMSG;
 }
 #endif /* MULTIPROCESSOR */
 #endif /* SUN4M || SUN4D */



Home | Main Index | Thread Index | Old Index