Source-Changes-HG archive

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

[src/trunk]: src/sys/uvm use uint64_t rather than int for storing the index o...



details:   https://anonhg.NetBSD.org/src/rev/0e286e5e9b84
branches:  trunk
changeset: 974875:0e286e5e9b84
user:      chs <chs%NetBSD.org@localhost>
date:      Sat Aug 15 07:24:09 2020 +0000

description:
use uint64_t rather than int for storing the index of a page within an object.

diffstat:

 sys/uvm/uvm_object.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (45 lines):

diff -r 6fa7c4ac54bc -r 0e286e5e9b84 sys/uvm/uvm_object.c
--- a/sys/uvm/uvm_object.c      Sat Aug 15 05:41:57 2020 +0000
+++ b/sys/uvm/uvm_object.c      Sat Aug 15 07:24:09 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_object.c,v 1.24 2020/08/14 09:06:15 chs Exp $      */
+/*     $NetBSD: uvm_object.c,v 1.25 2020/08/15 07:24:09 chs Exp $      */
 
 /*
  * Copyright (c) 2006, 2010, 2019 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_object.c,v 1.24 2020/08/14 09:06:15 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_object.c,v 1.25 2020/08/15 07:24:09 chs Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -259,7 +259,7 @@
 uvm_obj_page_tag_p(struct vm_page *pg, int tag)
 {
        struct uvm_object *uobj = pg->uobject;
-       int pgidx = pg->offset >> PAGE_SHIFT;
+       uint64_t pgidx = pg->offset >> PAGE_SHIFT;
 
        KASSERT(uobj != NULL);
        KASSERT(rw_lock_held(uobj->vmobjlock));
@@ -270,7 +270,7 @@
 uvm_obj_page_set_tag(struct vm_page *pg, int tag)
 {
        struct uvm_object *uobj = pg->uobject;
-       int pgidx = pg->offset >> PAGE_SHIFT;
+       uint64_t pgidx = pg->offset >> PAGE_SHIFT;
 
        KASSERT(uobj != NULL);
        KASSERT(rw_write_held(uobj->vmobjlock));
@@ -281,7 +281,7 @@
 uvm_obj_page_clear_tag(struct vm_page *pg, int tag)
 {
        struct uvm_object *uobj = pg->uobject;
-       int pgidx = pg->offset >> PAGE_SHIFT;
+       uint64_t pgidx = pg->offset >> PAGE_SHIFT;
 
        KASSERT(uobj != NULL);
        KASSERT(rw_write_held(uobj->vmobjlock));



Home | Main Index | Thread Index | Old Index