Source-Changes-HG archive

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

[src/trunk]: src/sys/arch Use PAGE_SIZE rather than NBPG.



details:   https://anonhg.NetBSD.org/src/rev/a14a7e7b9849
branches:  trunk
changeset: 545447:a14a7e7b9849
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Tue Apr 08 22:57:53 2003 +0000

description:
Use PAGE_SIZE rather than NBPG.

diffstat:

 sys/arch/amiga/amiga/genassym.cf        |   4 ++--
 sys/arch/amiga/amiga/locore.s           |   8 ++++----
 sys/arch/arm/arm32/bcopy_page.S         |  17 +++++++++--------
 sys/arch/arm/arm32/genassym.cf          |   3 ++-
 sys/arch/atari/atari/genassym.cf        |   4 ++--
 sys/arch/atari/atari/locore.s           |   6 +++---
 sys/arch/cesfic/cesfic/genassym.cf      |   4 ++--
 sys/arch/cesfic/cesfic/locore.s         |   6 +++---
 sys/arch/evbppc/evbppc/bus_dma.c        |   6 +++---
 sys/arch/evbppc/evbppc/evbppc_machdep.c |   8 ++++----
 sys/arch/hp300/hp300/genassym.cf        |   4 ++--
 sys/arch/hp300/hp300/locore.s           |  12 ++++++------
 sys/arch/luna68k/luna68k/genassym.cf    |   4 ++--
 sys/arch/luna68k/luna68k/locore.s       |   6 +++---
 sys/arch/m68k/m68k/copypage.s           |  20 ++++++++++----------
 sys/arch/mac68k/mac68k/genassym.cf      |   4 ++--
 sys/arch/mac68k/mac68k/locore.s         |   4 ++--
 sys/arch/mvme68k/mvme68k/genassym.cf    |   4 ++--
 sys/arch/mvme68k/mvme68k/locore.s       |  22 +++++++++++-----------
 sys/arch/news68k/news68k/genassym.cf    |   4 ++--
 sys/arch/news68k/news68k/locore.s       |   6 +++---
 sys/arch/next68k/next68k/genassym.cf    |   4 ++--
 sys/arch/next68k/next68k/locore.s       |   8 ++++----
 sys/arch/x68k/x68k/genassym.cf          |   4 ++--
 sys/arch/x68k/x68k/locore.s             |   6 +++---
 25 files changed, 90 insertions(+), 88 deletions(-)

diffs (truncated from 728 to 300 lines):

diff -r 9875cfa96f2f -r a14a7e7b9849 sys/arch/amiga/amiga/genassym.cf
--- a/sys/arch/amiga/amiga/genassym.cf  Tue Apr 08 22:37:52 2003 +0000
+++ b/sys/arch/amiga/amiga/genassym.cf  Tue Apr 08 22:57:53 2003 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: genassym.cf,v 1.17 2003/01/17 22:17:05 thorpej Exp $
+#      $NetBSD: genassym.cf,v 1.18 2003/04/08 22:57:54 thorpej Exp $
 
 #
 # Copyright (c) 1982, 1990, 1993
@@ -126,7 +126,7 @@
 # general constants
 define UPAGES          UPAGES
 define USPACE          USPACE
-define NBPG            NBPG
+define PAGE_SIZE       PAGE_SIZE
 define PGSHIFT         PGSHIFT
 define USRSTACK        USRSTACK
 
diff -r 9875cfa96f2f -r a14a7e7b9849 sys/arch/amiga/amiga/locore.s
--- a/sys/arch/amiga/amiga/locore.s     Tue Apr 08 22:37:52 2003 +0000
+++ b/sys/arch/amiga/amiga/locore.s     Tue Apr 08 22:57:53 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.s,v 1.134 2003/01/17 22:17:05 thorpej Exp $     */
+/*     $NetBSD: locore.s,v 1.135 2003/04/08 22:57:54 thorpej Exp $     */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -64,8 +64,8 @@
        .text
 GLOBAL(kernel_text)
 L_base:
-       .long   0x4ef80400+NBPG /* jmp jmp0.w */
-       .fill   NBPG/4-1,4,0/*xdeadbeef*/
+       .long   0x4ef80400+PAGE_SIZE    /* jmp jmp0.w */
+       .fill   PAGE_SIZE/4-1,4,0/*xdeadbeef*/
 
 #include <amiga/amiga/vectors.s>
 #include <amiga/amiga/custom.h>
@@ -1583,7 +1583,7 @@
 #endif
 
        .data
-       .space  NBPG
+       .space  PAGE_SIZE
 ASLOCAL(tmpstk)
 
 GLOBAL(mmutype)
diff -r 9875cfa96f2f -r a14a7e7b9849 sys/arch/arm/arm32/bcopy_page.S
--- a/sys/arch/arm/arm32/bcopy_page.S   Tue Apr 08 22:37:52 2003 +0000
+++ b/sys/arch/arm/arm32/bcopy_page.S   Tue Apr 08 22:57:53 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bcopy_page.S,v 1.5 2002/08/17 16:36:33 thorpej Exp $   */
+/*     $NetBSD: bcopy_page.S,v 1.6 2003/04/08 22:57:53 thorpej Exp $   */
 
 /*
  * Copyright (c) 1995 Scott Stevens
@@ -38,9 +38,10 @@
  * Created      : 08/04/95
  */
 
-#include <machine/param.h>
 #include <machine/asm.h>
 
+#include "assym.h"
+
 /* #define BIG_LOOPS */
 
 /*
@@ -53,7 +54,7 @@
  *   r1 - dest address
  *
  * Requires:
- *   number of bytes per page (NBPG) is a multiple of 512 (BIG_LOOPS), 128
+ *   number of bytes per page (PAGE_SIZE) is a multiple of 512 (BIG_LOOPS), 128
  *   otherwise.
  */
 
@@ -84,9 +85,9 @@
        PREFETCH_FIRST_CHUNK
        SAVE_REGS
 #ifdef BIG_LOOPS
-       mov     r2, #(NBPG >> 9)
+       mov     r2, #(PAGE_SIZE >> 9)
 #else
-       mov     r2, #(NBPG >> 7)
+       mov     r2, #(PAGE_SIZE >> 7)
 #endif
 
 1:
@@ -128,16 +129,16 @@
  *   r0 - dest address
  *
  * Requires:
- *   number of bytes per page (NBPG) is a multiple of 512 (BIG_LOOPS), 128
+ *   number of bytes per page (PAGE_SIZE) is a multiple of 512 (BIG_LOOPS), 128
  *   otherwise
  */
 
 ENTRY(bzero_page)
        stmfd   sp!, {r4-r8, lr}
 #ifdef BIG_LOOPS
-       mov     r2, #(NBPG >> 9)
+       mov     r2, #(PAGE_SIZE >> 9)
 #else
-       mov     r2, #(NBPG >> 7)
+       mov     r2, #(PAGE_SIZE >> 7)
 #endif
        mov     r3, #0
        mov     r4, #0
diff -r 9875cfa96f2f -r a14a7e7b9849 sys/arch/arm/arm32/genassym.cf
--- a/sys/arch/arm/arm32/genassym.cf    Tue Apr 08 22:37:52 2003 +0000
+++ b/sys/arch/arm/arm32/genassym.cf    Tue Apr 08 22:57:53 2003 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: genassym.cf,v 1.20 2003/01/17 22:28:49 thorpej Exp $
+#      $NetBSD: genassym.cf,v 1.21 2003/04/08 22:57:53 thorpej Exp $
 
 # Copyright (c) 1982, 1990 The Regents of the University of California.
 # All rights reserved.
@@ -61,6 +61,7 @@
 define VM_MAXUSER_ADDRESS      VM_MAXUSER_ADDRESS
 define PTE_BASE                PTE_BASE
 
+define PAGE_SIZE               PAGE_SIZE
 define UPAGES                  UPAGES
 define PGSHIFT                 PGSHIFT
 
diff -r 9875cfa96f2f -r a14a7e7b9849 sys/arch/atari/atari/genassym.cf
--- a/sys/arch/atari/atari/genassym.cf  Tue Apr 08 22:37:52 2003 +0000
+++ b/sys/arch/atari/atari/genassym.cf  Tue Apr 08 22:57:53 2003 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: genassym.cf,v 1.19 2003/01/17 22:34:23 thorpej Exp $
+#      $NetBSD: genassym.cf,v 1.20 2003/04/08 22:57:54 thorpej Exp $
 
 #-
 # Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -109,7 +109,7 @@
 # general constants
 define UPAGES                  UPAGES
 define USPACE                  USPACE
-define NBPG                    NBPG
+define PAGE_SIZE               PAGE_SIZE
 define PGSHIFT                 PGSHIFT
 define USRSTACK                USRSTACK
 
diff -r 9875cfa96f2f -r a14a7e7b9849 sys/arch/atari/atari/locore.s
--- a/sys/arch/atari/atari/locore.s     Tue Apr 08 22:37:52 2003 +0000
+++ b/sys/arch/atari/atari/locore.s     Tue Apr 08 22:57:53 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.s,v 1.90 2003/01/17 22:34:23 thorpej Exp $      */
+/*     $NetBSD: locore.s,v 1.91 2003/04/08 22:57:54 thorpej Exp $      */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -74,7 +74,7 @@
 /*
  * Clear & skip page zero, it will not be mapped
  */
-       .fill   NBPG/4,4,0
+       .fill   PAGE_SIZE/4,4,0
 
 #include <atari/atari/vectors.s>
 
@@ -1418,7 +1418,7 @@
 Ldorebootend:
 
        .data
-       .space  NBPG
+       .space  PAGE_SIZE
 ASLOCAL(tmpstk)
 GLOBAL(protorp)
        .long   0x80000002,0            |  prototype root pointer
diff -r 9875cfa96f2f -r a14a7e7b9849 sys/arch/cesfic/cesfic/genassym.cf
--- a/sys/arch/cesfic/cesfic/genassym.cf        Tue Apr 08 22:37:52 2003 +0000
+++ b/sys/arch/cesfic/cesfic/genassym.cf        Tue Apr 08 22:57:53 2003 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: genassym.cf,v 1.3 2003/01/17 22:40:31 thorpej Exp $
+#      $NetBSD: genassym.cf,v 1.4 2003/04/08 22:57:55 thorpej Exp $
 
 #
 # Copyright (c) 1982, 1990, 1993
@@ -96,7 +96,7 @@
 define KERNBASE                KERNBASE
 define UPAGES                  UPAGES
 define USPACE                  USPACE
-define NBPG                    NBPG
+define PAGE_SIZE               PAGE_SIZE
 define PGSHIFT                 PGSHIFT
 define USRSTACK                USRSTACK
 
diff -r 9875cfa96f2f -r a14a7e7b9849 sys/arch/cesfic/cesfic/locore.s
--- a/sys/arch/cesfic/cesfic/locore.s   Tue Apr 08 22:37:52 2003 +0000
+++ b/sys/arch/cesfic/cesfic/locore.s   Tue Apr 08 22:57:53 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.s,v 1.7 2003/01/19 16:33:54 thorpej Exp $       */
+/*     $NetBSD: locore.s,v 1.8 2003/04/08 22:57:55 thorpej Exp $       */
 
 /*
  * Copyright (c) 1994, 1995 Gordon W. Ross
@@ -67,7 +67,7 @@
  * our text segment.
  */
        .data
-       .space  NBPG
+       .space  PAGE_SIZE
 ASLOCAL(tmpstk)
 
 #include <cesfic/cesfic/vectors.s>
@@ -216,7 +216,7 @@
 #endif
        movl    #_C_LABEL(end),%d5      | end of static kernel text/data
 Lstart2:
-       addl    #NBPG-1,%d5
+       addl    #PAGE_SIZE-1,%d5
        andl    #PG_FRAME,%d5           | round to a page
        movl    %d5,%a4
        addl    %a5,%a4                 | convert to PA
diff -r 9875cfa96f2f -r a14a7e7b9849 sys/arch/evbppc/evbppc/bus_dma.c
--- a/sys/arch/evbppc/evbppc/bus_dma.c  Tue Apr 08 22:37:52 2003 +0000
+++ b/sys/arch/evbppc/evbppc/bus_dma.c  Tue Apr 08 22:57:53 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bus_dma.c,v 1.1 2002/12/09 12:15:54 scw Exp $  */
+/*     $NetBSD: bus_dma.c,v 1.2 2003/04/08 23:12:20 thorpej Exp $      */
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -151,7 +151,7 @@
                /*
                 * Compute the segment size, and adjust counts.
                 */
-               sgsize = NBPG - ((u_long)vaddr & PGOFSET);
+               sgsize = PAGE_SIZE - ((u_long)vaddr & PGOFSET);
                if (buflen < sgsize)
                        sgsize = buflen;
 
@@ -566,7 +566,7 @@
        for (curseg = 0; curseg < nsegs; curseg++) {
                for (addr = segs[curseg].ds_addr;
                    addr < (segs[curseg].ds_addr + segs[curseg].ds_len);
-                   addr += NBPG, va += NBPG, size -= NBPG) {
+                   addr += PAGE_SIZE, va += PAGE_SIZE, size -= PAGE_SIZE) {
                        if (size == 0)
                                panic("_bus_dmamem_map: size botch");
                        pmap_enter(pmap_kernel(), va, addr,
diff -r 9875cfa96f2f -r a14a7e7b9849 sys/arch/evbppc/evbppc/evbppc_machdep.c
--- a/sys/arch/evbppc/evbppc/evbppc_machdep.c   Tue Apr 08 22:37:52 2003 +0000
+++ b/sys/arch/evbppc/evbppc/evbppc_machdep.c   Tue Apr 08 22:57:53 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: evbppc_machdep.c,v 1.1 2002/12/09 12:15:54 scw Exp $   */
+/*     $NetBSD: evbppc_machdep.c,v 1.2 2003/04/08 23:12:20 thorpej Exp $       */
 
 /*
  * Copyright 2001, 2002 Wasabi Systems, Inc.
@@ -103,11 +103,11 @@
        if (va == 0)
                return NULL;
 
-       for (; len > 0; len -= NBPG) {
+       for (; len > 0; len -= PAGE_SIZE) {
                pmap_kenter_pa(taddr, faddr, 
                        VM_PROT_READ|VM_PROT_WRITE|PME_NOCACHE);
-               faddr += NBPG;
-               taddr += NBPG;
+               faddr += PAGE_SIZE;
+               taddr += PAGE_SIZE;
        }
 
        return (void *)(va + off);
diff -r 9875cfa96f2f -r a14a7e7b9849 sys/arch/hp300/hp300/genassym.cf
--- a/sys/arch/hp300/hp300/genassym.cf  Tue Apr 08 22:37:52 2003 +0000
+++ b/sys/arch/hp300/hp300/genassym.cf  Tue Apr 08 22:57:53 2003 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: genassym.cf,v 1.28 2003/01/17 22:53:08 thorpej Exp $
+#      $NetBSD: genassym.cf,v 1.29 2003/04/08 22:57:55 thorpej Exp $
 
 #
 # Copyright (c) 1982, 1990, 1993
@@ -145,7 +145,7 @@
 # general constants
 define UPAGES                  UPAGES
 define USPACE                  USPACE
-define NBPG                    NBPG
+define PAGE_SIZE               PAGE_SIZE
 define PGSHIFT                 PGSHIFT
 define USRSTACK                USRSTACK
 define MAXADDR                 MAXADDR
diff -r 9875cfa96f2f -r a14a7e7b9849 sys/arch/hp300/hp300/locore.s
--- a/sys/arch/hp300/hp300/locore.s     Tue Apr 08 22:37:52 2003 +0000
+++ b/sys/arch/hp300/hp300/locore.s     Tue Apr 08 22:57:53 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.s,v 1.128 2003/02/02 10:24:39 wiz Exp $ */
+/*     $NetBSD: locore.s,v 1.129 2003/04/08 22:57:55 thorpej Exp $     */
 
 /*
  * Copyright (c) 1994, 1995 Gordon W. Ross
@@ -77,7 +77,7 @@
  * The bootloader places the bootinfo in this page, and we allocate
  * a VA for it and map it in pmap_bootstrap().
  */
-       .fill   NBPG/4,4,0
+       .fill   PAGE_SIZE/4,4,0



Home | Main Index | Thread Index | Old Index