Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sh3/sh3 round_page(data_segment_size), too



details:   https://anonhg.NetBSD.org/src/rev/ed249e6f684e
branches:  trunk
changeset: 479874:ed249e6f684e
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Fri Dec 24 08:32:58 1999 +0000

description:
round_page(data_segment_size), too

diffstat:

 sys/arch/sh3/sh3/coff_exec.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (34 lines):

diff -r e813a4cd908e -r ed249e6f684e sys/arch/sh3/sh3/coff_exec.c
--- a/sys/arch/sh3/sh3/coff_exec.c      Fri Dec 24 08:29:23 1999 +0000
+++ b/sys/arch/sh3/sh3/coff_exec.c      Fri Dec 24 08:32:58 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: coff_exec.c,v 1.4 1999/12/17 08:25:35 msaitoh Exp $    */
+/*     $NetBSD: coff_exec.c,v 1.5 1999/12/24 08:32:58 msaitoh Exp $    */
 
 /*
  * Copyright (c) 1994, 1995 Scott Bartram
@@ -357,8 +357,6 @@
        epp->ep_taddr = COFF_ALIGN(sh.s_vaddr);
        offset = sh.s_scnptr - (sh.s_vaddr - epp->ep_taddr);
        epp->ep_tsize = sh.s_size + (sh.s_vaddr - epp->ep_taddr);
-       if (!(offset & PAGE_MASK) && !(epp->ep_taddr & PAGE_MASK))
-               epp->ep_tsize = round_page(epp->ep_tsize);
 
        /*
         * check if vnode is in open for writing, because we want to
@@ -378,6 +376,7 @@
        DPRINTF(("VMCMD: addr %lx size %lx offset %lx\n", epp->ep_taddr,
                 epp->ep_tsize, offset));
        if (!(offset & PAGE_MASK) && !(epp->ep_taddr & PAGE_MASK)) {
+               epp->ep_tsize = round_page(epp->ep_tsize);
                NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_pagedvn, epp->ep_tsize,
                          epp->ep_taddr, epp->ep_vp, offset,
                          VM_PROT_READ|VM_PROT_EXECUTE);
@@ -407,6 +406,7 @@
        DPRINTF(("VMCMD: addr %lx size %lx offset %lx\n", epp->ep_daddr,
                 dsize, offset));
        if (!(offset & PAGE_MASK) && !(epp->ep_daddr & PAGE_MASK)) {
+               dsize = round_page(dsize);
                NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_pagedvn, dsize,
                          epp->ep_daddr, epp->ep_vp, offset,
                          VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE);



Home | Main Index | Thread Index | Old Index