fix npages and upages for k10 architecture. this should be revisited, as the whole thing is quite hokey, since we multiple page sizes, and none is guarenteed to be 4k. Reference: /n/atom/patch/applied2013/nixupages Date: Thu Oct 3 01:42:53 CES 2013 Signed-off-by: quanstro@quanstro.net --- /sys/src/nix/port/qmalloc.c Thu Oct 3 01:41:42 2013 +++ /sys/src/nix/port/qmalloc.c Thu Oct 3 01:41:43 2013 @@ -388,11 +388,15 @@ uvlong t; Qlist *qlist; + /* + * upages calculation is incorrect due to Blocks, etc. directly + * allocated from KSEG2 + */ p = seprint(s, e, "%llud memory\n" "%d pagesize\n" "%llud kernel\n" - "??/%llud user\n", + "%llud user\n", sys->npages*PGSZ, PGSZ, sys->kpages, --- /sys/src/nix/k10/adr.c Thu Oct 3 01:41:44 2013 +++ /sys/src/nix/k10/adr.c Thu Oct 3 01:41:45 2013 @@ -468,6 +468,8 @@ print("adr: mem %#P %#P size %P\n", lo, hi, a->len); /* Convert a range into pages */ + sys->upages += (hi-lo)/PGSZ; + sys->npages += (hi-lo)/PGSZ; for(mem = lo; mem < hi; mem = nextmem){ nextmem = (mem + PGLSZ(0)) & ~m->pgszmask[0];