ref: 63879193e7e0d271daa215b02d6c4f64c98dc6ae
parent: cd92790c50433ee99fc3a3b3a95792e1daf2aed1
author: cinap_lenrek <[email protected]>
date: Tue Jul 7 17:13:36 EDT 2015
pc64: use unsigned long for kmapindex and mmu counts avoiding signed integer division
--- a/sys/src/9/pc64/dat.h
+++ b/sys/src/9/pc64/dat.h
@@ -141,9 +141,9 @@
MMU* mmutail;
MMU* kmaphead;
MMU* kmaptail;
- int kmapcount;
- int kmapindex;
- int mmucount;
+ ulong kmapcount;
+ ulong kmapindex;
+ ulong mmucount;
};
/*
@@ -182,7 +182,7 @@
u64int mmumap[4]; /* bitmap of pml4 entries for zapping */
MMU* mmufree; /* freelist for MMU structures */
- int mmucount; /* number of MMU structures in freelist */
+ ulong mmucount; /* number of MMU structures in freelist */
ulong ticks; /* of the clock since boot time */
Label sched; /* scheduler wakeup */
--- a/sys/src/9/pc64/mmu.c
+++ b/sys/src/9/pc64/mmu.c
@@ -27,8 +27,8 @@
Lock;
MMU *free;
- int nalloc;
- int nfree;
+ ulong nalloc;
+ ulong nfree;
} mmupool;
/* level */