summaryrefslogtreecommitdiff
path: root/sys/compat/m68k4k/m68k4k_exec.c
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>1999-11-26 16:44:29 +0000
committerArtur Grabowski <art@cvs.openbsd.org>1999-11-26 16:44:29 +0000
commit620fb93fc2e3dd44434ddb15020003a5788004ee (patch)
tree08795df9ee1e1c6243eb79dffe01777ec1048509 /sys/compat/m68k4k/m68k4k_exec.c
parentb668373c60a85bce316a1db3a382711a1ea964ed (diff)
Use round_page(X) instead of roundup(X, NBPG), use PAGE_SIZE instead of NBPG.
Diffstat (limited to 'sys/compat/m68k4k/m68k4k_exec.c')
-rw-r--r--sys/compat/m68k4k/m68k4k_exec.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/compat/m68k4k/m68k4k_exec.c b/sys/compat/m68k4k/m68k4k_exec.c
index 484d674b7fb..ce2f79a46b7 100644
--- a/sys/compat/m68k4k/m68k4k_exec.c
+++ b/sys/compat/m68k4k/m68k4k_exec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: m68k4k_exec.c,v 1.2 1999/01/11 05:12:14 millert Exp $ */
+/* $OpenBSD: m68k4k_exec.c,v 1.3 1999/11/26 16:44:28 art Exp $ */
/* $NetBSD: m68k4k_exec.c,v 1.1 1996/09/10 22:01:20 thorpej Exp $ */
/*
@@ -38,7 +38,7 @@
* Taken directly from kern/exec_aout.c and frobbed to map text and
* data as m68k4k executables expect.
*
- * This module only works on machines with NBPG == 4096. It's not clear
+ * This module only works on machines with PAGE_SIZE == 4096. It's not clear
* that making it work on other machines is worth the trouble.
*/
@@ -86,7 +86,7 @@ exec_m68k4k_makecmds(p, epp)
struct exec *execp = epp->ep_hdr;
/* See note above... */
- if (M68K4K_LDPGSZ != NBPG)
+ if (M68K4K_LDPGSZ != PAGE_SIZE)
return ENOEXEC;
if (epp->ep_hdrvalid < sizeof(struct exec))
@@ -203,7 +203,7 @@ exec_m68k4k_prep_nmagic(p, epp)
VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE);
/* set up command for bss segment */
- baddr = roundup(epp->ep_daddr + execp->a_data, NBPG);
+ baddr = round_page(epp->ep_daddr + execp->a_data);
bsize = epp->ep_daddr + epp->ep_dsize - baddr;
if (bsize > 0)
NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_zero, bsize, baddr,
@@ -236,7 +236,7 @@ exec_m68k4k_prep_omagic(p, epp)
sizeof(struct exec), VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE);
/* set up command for bss segment */
- baddr = roundup(epp->ep_daddr + execp->a_data, NBPG);
+ baddr = round_page(epp->ep_daddr + execp->a_data);
bsize = epp->ep_daddr + epp->ep_dsize - baddr;
if (bsize > 0)
NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_zero, bsize, baddr,
@@ -250,7 +250,7 @@ exec_m68k4k_prep_omagic(p, epp)
* Compensate `ep_dsize' for the amount of data covered by the last
* text page.
*/
- dsize = epp->ep_dsize + execp->a_text - roundup(execp->a_text, NBPG);
+ dsize = epp->ep_dsize + execp->a_text - round_page(execp->a_text);
epp->ep_dsize = (dsize > 0) ? dsize : 0;
return exec_setup_stack(p, epp);
}