diff options
Diffstat (limited to 'sys/arch/vax')
-rw-r--r-- | sys/arch/vax/if/if_uba.c | 7 | ||||
-rw-r--r-- | sys/arch/vax/include/param.h | 5 | ||||
-rw-r--r-- | sys/arch/vax/include/vmparam.h | 4 | ||||
-rw-r--r-- | sys/arch/vax/vax/machdep.c | 24 | ||||
-rw-r--r-- | sys/arch/vax/vax/mem.c | 8 |
5 files changed, 23 insertions, 25 deletions
diff --git a/sys/arch/vax/if/if_uba.c b/sys/arch/vax/if/if_uba.c index 34175ed4c18..fe3d5bbaa7f 100644 --- a/sys/arch/vax/if/if_uba.c +++ b/sys/arch/vax/if/if_uba.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_uba.c,v 1.6 2000/04/27 03:14:43 bjc Exp $ */ +/* $OpenBSD: if_uba.c,v 1.7 2001/05/05 20:56:55 art Exp $ */ /* $NetBSD: if_uba.c,v 1.15 1999/01/01 21:43:18 ragge Exp $ */ /* @@ -228,7 +228,7 @@ if_ubaget(ifu, ifr, totlen, ifp) } len = min(len, MCLBYTES); m->m_len = len; - if (!claligned(cp)){ + if (((vaddr_t)cp & PAGE_MASK) != 0) { goto copy; } /* @@ -347,7 +347,8 @@ if_ubaput(ifu, ifw, m) cp = ifw->ifw_addr; while (m) { dp = mtod(m, char *); - if (claligned(cp) && claligned(dp) && + if (((vaddr_t)cp & PAGE_MASK) == 0 && + ((vaddr_t)dp & PAGE_MASK) == 0 && (m->m_len == MCLBYTES || m->m_next == (struct mbuf *)0)) { struct pte *pte; int *ip; diff --git a/sys/arch/vax/include/param.h b/sys/arch/vax/include/param.h index 22e892c434c..3762edc6f21 100644 --- a/sys/arch/vax/include/param.h +++ b/sys/arch/vax/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.13 2000/10/09 22:55:35 bjc Exp $ */ +/* $OpenBSD: param.h,v 1.14 2001/05/05 20:56:56 art Exp $ */ /* $NetBSD: param.h,v 1.39 1999/10/22 21:14:34 ragge Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -85,9 +85,6 @@ #define MAXPHYS (63 * 1024) /* max raw I/O transfer size */ #define MAXBSIZE 0x4000 /* max FS block size - XXX */ -#define CLSIZELOG2 0 -#define CLSIZE 1 - #define UPAGES 2 /* pages of u-area */ #define USPACE (NBPG*UPAGES) #define REDZONEADDR (VAX_NBPG*3) /* Must be > sizeof(struct user) */ diff --git a/sys/arch/vax/include/vmparam.h b/sys/arch/vax/include/vmparam.h index a2080cb6f9b..52d54a8ea83 100644 --- a/sys/arch/vax/include/vmparam.h +++ b/sys/arch/vax/include/vmparam.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vmparam.h,v 1.10 2000/10/09 23:04:15 bjc Exp $ */ +/* $OpenBSD: vmparam.h,v 1.11 2001/05/05 20:56:56 art Exp $ */ /* $NetBSD: vmparam.h,v 1.32 2000/03/07 00:05:59 matt Exp $ */ /*- @@ -155,7 +155,7 @@ struct pmap_physseg { #define VM_PHYS_SIZE (USRIOSIZE*VAX_NBPG) /* virtual sizes (bytes) for various kernel submaps */ -#define VM_KMEM_SIZE (NKMEMCLUSTERS*CLBYTES) +#define VM_KMEM_SIZE (NKMEMCLUSTERS*PAGE_SIZE) #define VM_MBUF_SIZE (NMBCLUSTERS*MCLBYTES) diff --git a/sys/arch/vax/vax/machdep.c b/sys/arch/vax/vax/machdep.c index 3013e64359f..f6befecaed8 100644 --- a/sys/arch/vax/vax/machdep.c +++ b/sys/arch/vax/vax/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.29 2001/02/11 12:59:40 bjc Exp $ */ +/* $OpenBSD: machdep.c,v 1.30 2001/05/05 20:56:56 art Exp $ */ /* $NetBSD: machdep.c,v 1.108 2000/09/13 15:00:23 thorpej Exp $ */ /* @@ -239,7 +239,7 @@ cpu_startup() * physical memory allocated for it. */ curbuf = (vm_offset_t) buffers + i * MAXBSIZE; - curbufsize = CLBYTES * (i < residual ? base + 1 : base); + curbufsize = PAGE_SIZE * (i < residual ? base + 1 : base); while (curbufsize) { pg = uvm_pagealloc(NULL, 0, NULL, 0); if (pg == NULL) @@ -267,16 +267,16 @@ cpu_startup() phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr, VM_PHYS_SIZE, 0, FALSE, NULL); - mclrefcnt = (char *)malloc(NMBCLUSTERS+CLBYTES/MCLBYTES, + mclrefcnt = (char *)malloc(NMBCLUSTERS+PAGE_SIZE/MCLBYTES, M_MBUF, M_NOWAIT); - bzero(mclrefcnt, NMBCLUSTERS+CLBYTES/MCLBYTES); + bzero(mclrefcnt, NMBCLUSTERS+PAGE_SIZE/MCLBYTES); mb_map = uvm_km_suballoc(kernel_map, (vaddr_t *)&mbutl, &maxaddr, VM_MBUF_SIZE, VM_MAP_INTRSAFE, FALSE, NULL); timeout_init(); printf("avail memory = %ld\n", ptoa(uvmexp.free)); - printf("using %d buffers containing %d bytes of memory\n", nbuf, bufpages * CLBYTES); + printf("using %d buffers containing %d bytes of memory\n", nbuf, bufpages * PAGE_SIZE); /* * Set up buffers, so they can be used to read disk labels. @@ -306,11 +306,11 @@ cpu_dumpconf() dumplo = nblks - btodb(ctob(dumpsize)); } /* - * Don't dump on the first CLBYTES (why CLBYTES?) in case the dump + * Don't dump on the first block in case the dump * device includes a disk label. */ - if (dumplo < btodb(CLBYTES)) - dumplo = btodb(CLBYTES); + if (dumplo < btodb(PAGE_SIZE)) + dumplo = btodb(PAGE_SIZE); } int @@ -791,10 +791,10 @@ allocsys(v) */ if (bufpages == 0) { if (physmem < btoc(2 * 1024 * 1024)) - bufpages = physmem / (10 * CLSIZE); + bufpages = physmem / 10; else bufpages = (btoc(2 * 1024 * 1024) + physmem) * - BUFCACHEPERCENT / (100 * CLSIZE); + BUFCACHEPERCENT / 100; } if (nbuf == 0) nbuf = bufpages < 16 ? 16 : bufpages; @@ -806,8 +806,8 @@ allocsys(v) MAXBSIZE * 7 / 10; /* More buffer pages than fits into the buffers is senseless. */ - if (bufpages > nbuf * MAXBSIZE / CLBYTES) - bufpages = nbuf * MAXBSIZE / CLBYTES; + if (bufpages > nbuf * MAXBSIZE / PAGE_SIZE) + bufpages = nbuf * MAXBSIZE / PAGE_SIZE; /* Allocate 1/2 as many swap buffer headers as file i/o buffers. */ if (nswbuf == 0) { diff --git a/sys/arch/vax/vax/mem.c b/sys/arch/vax/vax/mem.c index 028ee19e024..f381ab3dbe8 100644 --- a/sys/arch/vax/vax/mem.c +++ b/sys/arch/vax/vax/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.7 2000/04/27 01:10:13 bjc Exp $ */ +/* $OpenBSD: mem.c,v 1.8 2001/05/05 20:56:57 art Exp $ */ /* $NetBSD: mem.c,v 1.15 1999/03/24 05:51:17 mrg Exp $ */ /* @@ -152,10 +152,10 @@ mmrw(dev, uio, flags) } if (zeropage == NULL) { zeropage = (caddr_t) - malloc(CLBYTES, M_TEMP, M_WAITOK); - bzero(zeropage, CLBYTES); + malloc(PAGE_SIZE, M_TEMP, M_WAITOK); + bzero(zeropage, PAGE_SIZE); } - c = min(iov->iov_len, CLBYTES); + c = min(iov->iov_len, PAGE_SIZE); error = uiomove(zeropage, c, uio); continue; |