printf("vm:do_adddma: dma table full\n");
for (i= 0; i<NR_DMA; i++)
{
- printf("%d: flags 0x%x proc %d base 0x%x size 0x%x\n",
+ printf("%d: flags 0x%x proc %d base 0x%lx size 0x%lx\n",
i, dmatab[i].dt_flags,
dmatab[i].dt_proc,
dmatab[i].dt_base,
if (!(dmatab[i].dt_flags & DTF_RELEASE_DMA))
continue;
- printf("do_getdma: setting reply to 0x%x@0x%x proc %d\n",
+ printf("do_getdma: setting reply to 0x%lx@0x%lx proc %d\n",
dmatab[i].dt_size, dmatab[i].dt_base,
dmatab[i].dt_proc);
msg->VMGD_PROCP= dmatab[i].dt_proc;
{
int nodes, pages, largest;
memstats(&nodes, &pages, &largest);
- printf("%d blocks, %d pages (%ukB) free, largest %d pages (%ukB)\n",
+ printf("%d blocks, %d pages (%lukB) free, largest %d pages (%lukB)\n",
nodes, pages, (u32_t) pages * (VM_PAGE_SIZE/1024),
largest, (u32_t) largest * (VM_PAGE_SIZE/1024));
}
} while(mem == NO_MEM && freed > 0);
if(mem == NO_MEM) {
- printf("alloc_mem_in_list: giving up, %dkB missing\n",
+ printf("alloc_mem_in_list: giving up, %lukB missing\n",
rempages * VM_PAGE_SIZE/1024);
printmemstats();
free_mem_list(head, 1);
int pte;
MYASSERT(vm_addrok(pt->pt_pt[i], 1));
if(!(pt->pt_dir[i] & I386_VM_PRESENT)) {
- printf("slot %d: pt->pt_pt[%d] = 0x%lx, but pt_dir entry 0x%lx\n",
+ printf("slot %d: pt->pt_pt[%d] = %p, but pt_dir entry 0x%lx\n",
slot, i, pt->pt_pt[i], pt->pt_dir[i]);
}
MYASSERT(pt->pt_dir[i] & I386_VM_PRESENT);
* and pt_ptalloc leaves the directory
* and other data in a consistent state.
*/
- printf("pt_writemap: pt_ptalloc failed\n", pdecheck);
+ printf("pt_writemap: pt_ptalloc failed\n");
return r;
}
}
ptr= msg->VMEN_ARGSPTR;
if(msg->VMEN_ARGSSIZE != sizeof(args)) {
- printf("VM: exec_newmem: args size %d != %ld\n",
+ printf("VM: exec_newmem: args size %d != %u\n",
msg->VMEN_ARGSSIZE, sizeof(args));
return EINVAL;
}
CALLMAP(VM_GETREF, do_get_refcount);
CALLMAP(VM_INFO, do_info);
CALLMAP(VM_QUERY_EXIT, do_query_exit);
+#if 0
CALLMAP(VM_FORGETBLOCKS, do_forgetblocks);
CALLMAP(VM_FORGETBLOCK, do_forgetblock);
CALLMAP(VM_YIELDBLOCKGETBLOCK, do_yieldblockgetblock);
+#endif
/* Sanity checks */
if(find_kernel_top() >= VM_PROCSTART)
}
if(!(vr = map_lookup(vmp, addr))) {
- printf("VM: unmap: virtual address 0x%lx not found in %d\n",
+ printf("VM: unmap: virtual address %p not found in %d\n",
m->VMUM_ADDR, vmp->vm_endpoint);
return EFAULT;
}
physr_iter iter;
struct phys_region *ph;
printf("map_printmap: map_name: %s\n", map_name(vr));
- printf("\t%s (len 0x%lx, %dkB), %s\n",
+ printf("\t%s (len 0x%lx, %lukB), %s\n",
arch_map2str(vmp, vr->vaddr), vr->length,
vr->length/1024, map_name(vr));
printf("\t\tphysblocks:\n");
MYASSERT(!(vr->vaddr % VM_PAGE_SIZE));,
if(pr->ph->refcount != pr->ph->seencount) {
map_printmap(vmp);
- printf("ph in vr 0x%lx: 0x%lx-0x%lx refcount %d "
+ printf("ph in vr %p: 0x%lx-0x%lx refcount %d "
"but seencount %lu\n",
vr, pr->offset,
pr->offset + pr->ph->length,
}
if(blocks > 0)
- printf("%d blocks, %dkB; ", blocks, mem/1024);
+ printf("%d blocks, %lukB; ", blocks, mem/1024);
printmemstats();
}
assert(!(size % VM_PAGE_SIZE));
startv = region_find_slot(dvmp, dst_addr, VM_DATATOP, size, &prev);
if (startv == (vir_bytes) -1) {
- printf("map_remap: search 0x%x...\n", dst_addr);
+ printf("map_remap: search 0x%lx...\n", dst_addr);
map_printmap(dvmp);
return ENOMEM;
}
}
}
- printf("%6dkB %6dkB\n", used/1024, weighted/1024);
+ printf("%6lukB %6lukB\n", used/1024, weighted/1024);
return;
}
assert(ph->offset == regionoffset);
if(ph->ph->length != length) {
- printf("VM: get_clean_phys_region: len mismatch (%d, %d)\n",
+ printf("VM: get_clean_phys_region: len mismatch (%lu, %lu)\n",
ph->ph->length, length);
return NULL;
}
/* Check the size as a sanity check. */
if(yb->len != len) {
- printf("VM: id 0x%lx%08lx mismatched size (%d, %d) for %d\n",
+ printf("VM: id 0x%lx%08lx mismatched size (%lu, %lu) for %d\n",
ex64hi(id), ex64lo(id), yb->len, len, vmp->vm_endpoint);
return ESRCH;
}
}
#else
-#define SANITYCHECK
+#define SANITYCHECK (void)
#define SLABSANITYCHECK(l)
#define SLABSANE(ptr)
#endif
#if SANITYCHECKS
#define OBJSTATSCHECK(cond) \
if(!(cond)) { \
- printf("VM: objstats: %s failed for ptr 0x%p, %d bytes\n", \
+ printf("VM: objstats: %s failed for ptr %p, %d bytes\n", \
#cond, mem, bytes); \
return EINVAL; \
}