HFI1: do device ioremap() mappings in per-process fashion

This commit is contained in:
Balazs Gerofi
2017-08-18 20:15:48 +09:00
parent 5ac582a678
commit 62e438a0aa
4 changed files with 226 additions and 148 deletions

View File

@@ -481,10 +481,13 @@ long do_syscall(struct syscall_request *req, int cpu, int pid)
#endif // PROFILE_ENABLE
if (req->number == __NR_open && rc > 0) {
if (res.private_data && !strncmp((const char *)req->args[0], "/dev/hfi", 8)) {
if (res.private_data &&
!strncmp((const char *)req->args[0], "/dev/hfi", 8)) {
thread->proc->fd_priv_table[rc] = res.private_data;
kprintf("%s: PID: %d, open fd: %d, filename: %s, private_data: 0x%lx\n",
__FUNCTION__, thread->proc->pid, rc, req->args[0], res.private_data);
kprintf("%s: PID: %d, open fd: %d, filename: "
"%s, private_data: 0x%lx\n",
__FUNCTION__, thread->proc->pid,
rc, req->args[0], res.private_data);
}
}