]> git.lizzy.rs Git - plan9front.git/blobdiff - sys/src/9/ppc/main.c
devmnt: make sure auth chan is on said conection in mntattach()
[plan9front.git] / sys / src / 9 / ppc / main.c
index a77f3112757fbf621d2818c73f5ac1b59eca2a2d..5440fedae678daa2845f55f4751a8ef710f63b52 100644 (file)
@@ -84,7 +84,6 @@ main(void)
        links();
        chandevreset();
        pageinit();
-       swapinit();
        sharedseginit();
        fpsave(&initfp);
        initfp.fpscr = 0;
@@ -233,7 +232,7 @@ userinit(void)
        s->flushme++;
        p->seg[TSEG] = s;
        pg = newpage(1, 0, UTZERO);
-       memset(pg->cachectl, PG_TXTFLUSH, sizeof(pg->cachectl));
+       pg->txtflush = ~0;
        segpage(s, pg);
        k = kmap(s->map[0]->pages[0]);
        memmove((ulong*)VA(k), initcode, sizeof initcode);
@@ -243,38 +242,10 @@ userinit(void)
 }
 
 void
-exit(int ispanic)
+exit(int)
 {
-       int ms, once;
-
-       lock(&active);
-       if(ispanic)
-               active.ispanic = ispanic;
-       else if(m->machno == 0 && (active.machs & (1<<m->machno)) == 0)
-               active.ispanic = 0;
-       once = active.machs & (1<<m->machno);
-       active.machs &= ~(1<<m->machno);
-       active.exiting = 1;
-       unlock(&active);
-
-       if(once)
-               print("cpu%d: exiting\n", m->machno);
-       spllo();
-       for(ms = 5*1000; ms > 0; ms -= TK2MS(2)){
-               delay(TK2MS(2));
-               if(active.machs == 0 && consactive() == 0)
-                       break;
-       }
-
-       if(active.ispanic && m->machno == 0){
-               if(cpuserver)
-                       delay(10000);
-               else if(conf.monitor)
-                       for(;;);
-       }
-       else
-               delay(1000);
-
+       cpushutdown();
+       for(;;) idlehands();
 }
 
 /*
@@ -321,7 +292,7 @@ procsave(Proc *p)
        p->kentry -= t;
        if(p->fpstate == FPactive){
                if(p->state != Moribund)
-                       fpsave(&up->fpsave);
+                       fpsave(up->fpsave);
                p->fpstate = FPinactive;
        }
 }
@@ -424,8 +395,6 @@ confinit(void)
                 */
                imagmem->maxsize = kpages;
        }
-
-//     conf.monitor = 1;       /* BUG */
 }
 
 static int
@@ -527,3 +496,10 @@ cistrncmp(char *a, char *b, int n)
 
        return 0;
 }
+
+void
+setupwatchpts(Proc *, Watchpt *, int n)
+{
+       if(n > 0)
+               error("no watchpoints");
+}