make allocmem accept and return values in bytes, ramdisk expects this.
This commit is contained in:
@@ -817,15 +817,19 @@ PUBLIC void release_dma(struct vmproc *vmp)
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_allocmem(message *m)
|
||||
{
|
||||
phys_clicks mem;
|
||||
phys_clicks mem, clicks;
|
||||
|
||||
if((mem=ALLOC_MEM((phys_clicks) m->VMAM_CLICKS, PAF_CLEAR)) == NO_MEM) {
|
||||
clicks = 1 + ((vir_bytes)m->VMAM_BYTES / CLICK_SIZE);
|
||||
|
||||
if((mem=ALLOC_MEM(clicks, PAF_CLEAR)) == NO_MEM) {
|
||||
return ENOMEM;
|
||||
}
|
||||
|
||||
m->VMAM_MEMBASE = mem;
|
||||
m->VMAM_MEMBASE = CLICK2ABS(mem);
|
||||
|
||||
#if 0
|
||||
printf("VM: do_allocmem: 0x%lx clicks OK at 0x%lx\n", m->VMAM_CLICKS, mem);
|
||||
#endif
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user