summaryrefslogtreecommitdiff
path: root/sys/arch/amiga
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/amiga')
-rw-r--r--sys/arch/amiga/amiga/machdep.c25
-rw-r--r--sys/arch/amiga/amiga/mem.c12
-rw-r--r--sys/arch/amiga/amiga/trap.c6
-rw-r--r--sys/arch/amiga/amiga/vm_machdep.c4
-rw-r--r--sys/arch/amiga/dev/fd.c6
-rw-r--r--sys/arch/amiga/include/param.h6
-rw-r--r--sys/arch/amiga/include/vmparam.h6
7 files changed, 32 insertions, 33 deletions
diff --git a/sys/arch/amiga/amiga/machdep.c b/sys/arch/amiga/amiga/machdep.c
index f88984c6040..d028c7820e3 100644
--- a/sys/arch/amiga/amiga/machdep.c
+++ b/sys/arch/amiga/amiga/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.41 2000/05/28 02:23:30 art Exp $ */
+/* $OpenBSD: machdep.c,v 1.42 2001/05/05 20:56:32 art Exp $ */
/* $NetBSD: machdep.c,v 1.95 1997/08/27 18:31:17 is Exp $ */
/*
@@ -77,7 +77,7 @@
#include <sys/sem.h>
#endif
#include <net/netisr.h>
-#define MAXMEM 64*1024*CLSIZE /* XXX - from cmap.h */
+#define MAXMEM 64*1024 /* XXX - from cmap.h */
#include <vm/vm_param.h>
#include <vm/pmap.h>
#include <vm/vm_map.h>
@@ -394,10 +394,9 @@ again:
*/
if (bufpages == 0) {
if (physmem < btoc(2 * 1024 * 1024))
- bufpages = physmem / (10 * CLSIZE);
+ bufpages = physmem / (10);
else
- bufpages = (btoc(2 * 1024 * 1024) + physmem) /
- (20 * CLSIZE);
+ bufpages = (btoc(2 * 1024 * 1024) + physmem) / 20;
}
if (nbuf == 0) {
@@ -475,7 +474,7 @@ again:
* "base" pages for the rest.
*/
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);
@@ -504,7 +503,7 @@ again:
* but has no 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);
vm_map_pageable(buffer_map, curbuf, curbuf+curbufsize, FALSE);
vm_map_simplify(buffer_map, curbuf);
#endif
@@ -537,9 +536,9 @@ again:
* Finally, allocate mbuf pool. Since mclrefcnt is an off-size
* we use the more space efficient malloc in place of kmem_alloc.
*/
- mclrefcnt = (char *)malloc(NMBCLUSTERS + CLBYTES / MCLBYTES, M_MBUF,
+ mclrefcnt = (char *)malloc(NMBCLUSTERS + PAGE_SIZE / MCLBYTES, M_MBUF,
M_NOWAIT);
- bzero(mclrefcnt, NMBCLUSTERS+CLBYTES/MCLBYTES);
+ bzero(mclrefcnt, NMBCLUSTERS+PAGE_SIZE/MCLBYTES);
#if defined(UVM)
mb_map = uvm_km_suballoc(kernel_map, (vaddr_t *)&mbutl, &maxaddr,
VM_MBUF_SIZE, VM_MAP_INTRSAFE, FALSE, NULL);
@@ -563,7 +562,7 @@ again:
ptoa(cnt.v_free_count)/NBPG);
#endif
printf("using %d buffers containing %d bytes of memory\n", nbuf,
- bufpages * CLBYTES);
+ bufpages * PAGE_SIZE);
/*
* display memory configuration passed from loadbsd
@@ -902,11 +901,11 @@ dumpconf()
}
--dumplo; /* XXX assume header fits in one block */
/*
- * Don't dump on the first CLBYTES (why CLBYTES?)
+ * Don't dump on the first PAGE_SIZE
* 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);
}
/*
diff --git a/sys/arch/amiga/amiga/mem.c b/sys/arch/amiga/amiga/mem.c
index cacf33b9795..a5feb2ca3ca 100644
--- a/sys/arch/amiga/amiga/mem.c
+++ b/sys/arch/amiga/amiga/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.11 2001/01/31 22:39:39 jason Exp $ */
+/* $OpenBSD: mem.c,v 1.12 2001/05/05 20:56:32 art Exp $ */
/* $NetBSD: mem.c,v 1.18 1997/02/02 07:17:14 thorpej Exp $ */
/*
@@ -178,9 +178,9 @@ mmrw(dev, uio, flags)
if (uio->uio_rw == UIO_READ) {
if (devzeropage == NULL) {
devzeropage = (caddr_t)
- malloc(CLBYTES, M_TEMP,
+ malloc(PAGE_SIZE, M_TEMP,
M_WAITOK);
- bzero(devzeropage, CLBYTES);
+ bzero(devzeropage, PAGE_SIZE);
}
c = min(c, NBPG - (int)v);
v = (vm_offset_t)devzeropage;
@@ -208,10 +208,10 @@ mmrw(dev, uio, flags)
}
if (devzeropage == NULL) {
devzeropage = (caddr_t)
- malloc(CLBYTES, M_TEMP, M_WAITOK);
- bzero(devzeropage, CLBYTES);
+ malloc(PAGE_SIZE, M_TEMP, M_WAITOK);
+ bzero(devzeropage, PAGE_SIZE);
}
- c = min(iov->iov_len, CLBYTES);
+ c = min(iov->iov_len, PAGE_SIZE);
error = uiomove(devzeropage, c, uio);
continue;
diff --git a/sys/arch/amiga/amiga/trap.c b/sys/arch/amiga/amiga/trap.c
index dad86e56805..9124c183def 100644
--- a/sys/arch/amiga/amiga/trap.c
+++ b/sys/arch/amiga/amiga/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.19 2000/11/10 18:15:35 art Exp $ */
+/* $OpenBSD: trap.c,v 1.20 2001/05/05 20:56:32 art Exp $ */
/* $NetBSD: trap.c,v 1.56 1997/07/16 00:01:47 is Exp $ */
/*
@@ -391,7 +391,7 @@ trapmmufault(type, code, v, fp, p, sticks)
*/
nss = 0;
if (map != kernel_map && (caddr_t)va >= vm->vm_maxsaddr) {
- nss = clrnd(btoc(USRSTACK - (unsigned)va));
+ nss = btoc(USRSTACK - (unsigned)va);
if (nss > btoc(p->p_rlimit[RLIMIT_STACK].rlim_cur)) {
rv = KERN_FAILURE;
goto nogo;
@@ -485,7 +485,7 @@ trapmmufault(type, code, v, fp, p, sticks)
*/
if (map != kernel_map && (caddr_t)va >= vm->vm_maxsaddr) {
if (rv == KERN_SUCCESS) {
- nss = clrnd(btoc(USRSTACK-(unsigned)va));
+ nss = btoc(USRSTACK-(unsigned)va);
if (nss > vm->vm_ssize)
vm->vm_ssize = nss;
} else if (rv == KERN_PROTECTION_FAILURE)
diff --git a/sys/arch/amiga/amiga/vm_machdep.c b/sys/arch/amiga/amiga/vm_machdep.c
index 320250d374e..6af0b043dc4 100644
--- a/sys/arch/amiga/amiga/vm_machdep.c
+++ b/sys/arch/amiga/amiga/vm_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_machdep.c,v 1.16 2000/11/08 11:44:00 art Exp $ */
+/* $OpenBSD: vm_machdep.c,v 1.17 2001/05/05 20:56:32 art Exp $ */
/* $NetBSD: vm_machdep.c,v 1.30 1997/05/19 10:14:50 veego Exp $ */
/*
@@ -182,7 +182,7 @@ pagemove(from, to, size)
register vm_offset_t pa;
#ifdef DEBUG
- if (size & CLOFSET)
+ if ((size & PAGE_MASK) != 0)
panic("pagemove");
#endif
while (size > 0) {
diff --git a/sys/arch/amiga/dev/fd.c b/sys/arch/amiga/dev/fd.c
index 1361015130e..a6f03f2c2c2 100644
--- a/sys/arch/amiga/dev/fd.c
+++ b/sys/arch/amiga/dev/fd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fd.c,v 1.13 2001/02/16 13:48:43 espie Exp $ */
+/* $OpenBSD: fd.c,v 1.14 2001/05/05 20:56:33 art Exp $ */
/* $NetBSD: fd.c,v 1.36 1996/12/23 09:09:59 veego Exp $ */
/*
@@ -911,10 +911,10 @@ fdsetdisklabel(sc, lp)
* make sure selected partition is within bounds
* XXX on the second check, its to handle a bug in
* XXX the cluster routines as they require mutliples
- * XXX of CLBYTES currently
+ * XXX of PAGE_SIZE currently
*/
if ((pp->p_offset + pp->p_size >= lp->d_secperunit) ||
- (pp->p_frag * pp->p_fsize % CLBYTES))
+ (pp->p_frag * pp->p_fsize % PAGE_SIZE))
return(EINVAL);
done:
bcopy(lp, clp, sizeof(struct disklabel));
diff --git a/sys/arch/amiga/include/param.h b/sys/arch/amiga/include/param.h
index 12da70cf30b..3673a2a8c92 100644
--- a/sys/arch/amiga/include/param.h
+++ b/sys/arch/amiga/include/param.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: param.h,v 1.11 2000/02/22 19:27:43 deraadt Exp $ */
+/* $OpenBSD: param.h,v 1.12 2001/05/05 20:56:33 art Exp $ */
/* $NetBSD: param.h,v 1.35 1997/07/10 08:22:36 veego Exp $ */
/*
@@ -69,10 +69,10 @@
#define NPTEPG (NBPG/(sizeof (pt_entry_t)))
/*
- * Size of kernel malloc arena in CLBYTES-sized logical pages
+ * Size of kernel malloc arena in logical pages
*/
#ifndef NKMEMCLUSTERS
-#define NKMEMCLUSTERS (3072 * 1024 / CLBYTES)
+#define NKMEMCLUSTERS (3072 * 1024 / PAGE_SIZE)
#endif
#define MSGBUFSIZE 8192
diff --git a/sys/arch/amiga/include/vmparam.h b/sys/arch/amiga/include/vmparam.h
index 3ad186e1aa1..d29ee5be68b 100644
--- a/sys/arch/amiga/include/vmparam.h
+++ b/sys/arch/amiga/include/vmparam.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmparam.h,v 1.9 2000/12/15 15:18:36 art Exp $ */
+/* $OpenBSD: vmparam.h,v 1.10 2001/05/05 20:56:33 art Exp $ */
/* $NetBSD: vmparam.h,v 1.16 1997/07/12 16:18:36 perry Exp $ */
/*
@@ -162,8 +162,8 @@
* virtual sizes (bytes) for various kernel submaps
*/
#define VM_MBUF_SIZE (NMBCLUSTERS*MCLBYTES)
-#define VM_KMEM_SIZE (NKMEMCLUSTERS*CLBYTES)
-#define VM_PHYS_SIZE (USRIOSIZE*CLBYTES)
+#define VM_KMEM_SIZE (NKMEMCLUSTERS*PAGE_SIZE)
+#define VM_PHYS_SIZE (USRIOSIZE*PAGE_SIZE)
#define MACHINE_NEW_NONCONTIG