Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/news68k/news68k Cosmetics. (some KNF, typo etc.)



details:   https://anonhg.NetBSD.org/src/rev/07b65b9418c5
branches:  trunk
changeset: 513164:07b65b9418c5
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Wed Jul 25 15:48:09 2001 +0000

description:
Cosmetics. (some KNF, typo etc.)

diffstat:

 sys/arch/news68k/news68k/machdep.c |  36 +++++++++++++++++-------------------
 1 files changed, 17 insertions(+), 19 deletions(-)

diffs (131 lines):

diff -r ccada7f9521e -r 07b65b9418c5 sys/arch/news68k/news68k/machdep.c
--- a/sys/arch/news68k/news68k/machdep.c        Wed Jul 25 15:44:48 2001 +0000
+++ b/sys/arch/news68k/news68k/machdep.c        Wed Jul 25 15:48:09 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.24 2001/07/07 15:27:21 tsutsui Exp $     */
+/*     $NetBSD: machdep.c,v 1.25 2001/07/25 15:48:09 tsutsui Exp $     */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -101,7 +101,7 @@
 /* Our exported CPU info; we can have only one. */  
 struct cpu_info cpu_info_store;
 
-struct vm_map *exec_map = NULL;  
+struct vm_map *exec_map = NULL;
 struct vm_map *mb_map = NULL;
 struct vm_map *phys_map = NULL;
 
@@ -196,8 +196,8 @@
                pmap_enter(pmap_kernel(), (vaddr_t)msgbufaddr + i * NBPG,
                    avail_end + i * NBPG, VM_PROT_READ|VM_PROT_WRITE,
                    VM_PROT_READ|VM_PROT_WRITE|PMAP_WIRED);
+       pmap_update();
        initmsgbuf(msgbufaddr, m68k_round_page(MSGBUFSIZE));
-       pmap_update();
 }
 
 /*
@@ -235,7 +235,7 @@
 
        /*
         * Find out how much space we need, allocate it,
-        * and the give everything true virtual addresses.
+        * and then give everything true virtual addresses.
         */
        size = (vsize_t)allocsys(NULL, NULL);
        if ((v = (caddr_t)uvm_km_zalloc(kernel_map, round_page(size))) == 0)
@@ -249,9 +249,9 @@
         */
        size = MAXBSIZE * nbuf;
        if (uvm_map(kernel_map, (vaddr_t *) &buffers, round_page(size),
-                   NULL, UVM_UNKNOWN_OFFSET, 0,
-                   UVM_MAPFLAG(UVM_PROT_NONE, UVM_PROT_NONE, UVM_INH_NONE,
-                               UVM_ADV_NORMAL, 0)) != 0)
+           NULL, UVM_UNKNOWN_OFFSET, 0,
+           UVM_MAPFLAG(UVM_PROT_NONE, UVM_PROT_NONE, UVM_INH_NONE,
+           UVM_ADV_NORMAL, 0)) != 0)
                panic("startup: cannot allocate VM for buffers");
        minaddr = (vaddr_t)buffers;
        base = bufpages / nbuf;
@@ -268,15 +268,15 @@
                 * "base" pages for the rest.
                 */
                curbuf = (vaddr_t) buffers + (i * MAXBSIZE);
-               curbufsize = NBPG * ((i < residual) ? (base+1) : base);
+               curbufsize = NBPG * ((i < residual) ? (base + 1) : base);
 
                while (curbufsize) {
                        pg = uvm_pagealloc(NULL, 0, NULL, 0);
-                       if (pg == NULL) 
+                       if (pg == NULL)
                                panic("cpu_startup: not enough memory for "
                                    "buffer cache");
                        pmap_kenter_pa(curbuf, VM_PAGE_TO_PHYS(pg),
-                                       VM_PROT_READ|VM_PROT_WRITE);
+                           VM_PROT_READ|VM_PROT_WRITE);
                        curbuf += PAGE_SIZE;
                        curbufsize -= PAGE_SIZE;
                }
@@ -288,20 +288,19 @@
         * limits the number of processes exec'ing at any time.
         */
        exec_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
-                                  16*NCARGS, VM_MAP_PAGEABLE, FALSE, NULL);
+           16 * NCARGS, VM_MAP_PAGEABLE, FALSE, NULL);
 
        /*
         * Allocate a submap for physio
         */
        phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
-                                  VM_PHYS_SIZE, 0, FALSE, NULL);
+           VM_PHYS_SIZE, 0, FALSE, NULL);
 
        /*
         * Finally, allocate mbuf cluster submap.
         */
        mb_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
-                                nmbclusters * mclbytes, VM_MAP_INTRSAFE,
-                                FALSE, NULL);
+           nmbclusters * mclbytes, VM_MAP_INTRSAFE, FALSE, NULL);
 
 #ifdef DEBUG
        pmapdebug = opmapdebug;
@@ -323,9 +322,8 @@
                panic("can't mark pre-text pages off-limits");
 
        /*
-        * Tell the VM system that writing to kernel text isn't allowed.
+        * Tell the VM system that writing to the kernel text isn't allowed.
         * If we don't, we might end up COW'ing the text segment!
-        *
         */
        if (uvm_map_protect(kernel_map, m68k_trunc_page(&kernel_text),
            m68k_round_page(&etext), UVM_PROT_READ|UVM_PROT_EXEC, TRUE) != 0)
@@ -464,7 +462,7 @@
        /* Disable interrupts. */
        splhigh();
 
-       /* If rebooting and a dump is requested do it. */
+       /* If rebooting and a dump is requested, do it. */
        if (howto & RB_DUMP)
                dumpsys();
 
@@ -760,7 +758,7 @@
        u_short evec;
 {
        printf("unexpected trap (vector offset %x) from %x\n",
-              evec & 0xFFF, pc);
+           evec & 0xFFF, pc);
 }
 
 /* XXX should change the interface, and make one badaddr() function */
@@ -988,7 +986,7 @@
        *parity_vector = PARITY_VECT;
 
        isrlink_vectored((int (*) __P((void *)))parityerror, NULL,
-                        PARITY_PRI, PARITY_VECT);
+           PARITY_PRI, PARITY_VECT);
 
        *ctrl_parity_clr = 1;
        *ctrl_parity = 1;



Home | Main Index | Thread Index | Old Index