use right physical address for host side read after large page mapping

This commit is contained in:
Balazs Gerofi bgerofi@riken.jp
2012-11-03 19:01:12 +09:00
committed by Masamichi Takagi m-takagi@ab.jp.nec.com
parent 88e9ee2a7c
commit 790ae3a9c7

View File

@ -468,6 +468,7 @@ SYSCALL_DECLARE(mmap)
s + len);
aal_mc_spinlock_unlock(&cpu_local_var(current)->vm->memory_range_lock, flags);
if (region->map_end < s + len) { return -EINVAL; }
s = region->map_end - len;
struct syscall_request request AAL_DMA_ALIGN;
request.number = n;
@ -484,7 +485,7 @@ SYSCALL_DECLARE(mmap)
request.args[0] = __phys;
int r = do_syscall(&request, ctx);
if(r == 0) { return region->map_end - len; } else { return -EINVAL; }
if(r == 0) { return s; } else { return -EINVAL; }
}
dkprintf("mmap flags not supported: fd = %lx, %lx\n",
aal_mc_syscall_arg4(ctx), aal_mc_syscall_arg5(ctx));