[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] hurd: Implement device memory mapping
From: |
Joan Lledó |
Subject: |
Re: [PATCH] hurd: Implement device memory mapping |
Date: |
Tue, 28 Dec 2021 17:48:20 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 |
Hi,
El 28/12/21 a les 13:55, Samuel Thibault ha escrit:
? The interface explicitly says they can be different.
Samuel
Sorry, I was confused. I meant the function pci_device_hurd_map_range at
libpciaccess. If io_map returns different ports for robj and wobj, we
can only assign one of them to the variable pager, which we send to
vm_map. Since we can only pass one of them to vm_map, when io_map
returns different values for robj and wobj we could return an error and
don't map. Something like this:
case VM_PROT_READ|VM_PROT_WRITE:
if (robj == wobj) {
if (robj == MACH_PORT_NULL)
return EPERM;
pager = wobj;
/* Remove extra reference. */
mach_port_deallocate (mach_task_self (), pager);
}
else {
if (robj != MACH_PORT_NULL)
mach_port_deallocate (mach_task_self (), robj);
if (wobj != MACH_PORT_NULL)
mach_port_deallocate (mach_task_self (), wobj);
return EPERM;
}
break;
- Re: About consuming/releaseing ports in libpciaccess, Joan Lledó, 2021/12/12
- [PATCH] hurd: Implement device memory mapping, Joan Lledó, 2021/12/12
- Re: [PATCH] hurd: Implement device memory mapping, Samuel Thibault, 2021/12/12
- Re: [PATCH] hurd: Implement device memory mapping, Joan Lledó, 2021/12/19
- Re: [PATCH] hurd: Implement device memory mapping, Samuel Thibault, 2021/12/19
- Re: [PATCH] hurd: Implement device memory mapping, Joan Lledó, 2021/12/28
- Re: [PATCH] hurd: Implement device memory mapping, Samuel Thibault, 2021/12/28
- Re: [PATCH] hurd: Implement device memory mapping,
Joan Lledó <=
- Re: [PATCH] hurd: Implement device memory mapping, Samuel Thibault, 2021/12/28
- Re: [PATCH] hurd: Implement device memory mapping, Joan Lledó, 2021/12/30
- [PATCH] hurd: Implement device memory mapping, Joan Lledó, 2021/12/30