[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] hurd: Implement device memory mapping
From: |
Samuel Thibault |
Subject: |
Re: [PATCH] hurd: Implement device memory mapping |
Date: |
Sun, 9 Jan 2022 01:15:44 +0100 |
User-agent: |
NeoMutt/20170609 (1.8.3) |
Samuel Thibault, le dim. 09 janv. 2022 01:02:57 +0100, a ecrit:
> Joan Lledó via Bug reports for the GNU Hurd, le mer. 05 janv. 2022 13:08:01
> +0100, a ecrit:
> > @@ -523,18 +637,18 @@ pci_system_hurd_create(void)
> >
> > pci_sys->num_devices = 0;
> >
> > - if ((err = get_privileged_ports (NULL, &device_master)) ||
> > (device_master == MACH_PORT_NULL)) {
> > - pci_system_cleanup();
> > - return err;
> > - }
> > -
> > - err = device_open (device_master, D_READ|D_WRITE, "pci", &pci_port);
> > - if (!err) {
> > - root = file_name_lookup_under (pci_port, ".", O_DIRECTORY | O_RDWR
> > | O_EXEC, 0);
> > - }
> > -
> > - if (!root) {
> > - root = file_name_lookup (_SERVERS_BUS_PCI, O_RDWR, 0);
> > + if ((err = get_privileged_ports (NULL, &device_master))
> > + || (device_master == MACH_PORT_NULL)) {
> > + root = file_name_lookup (_SERVERS_BUS_PCI, O_RDONLY, 0);
> > + } else {
> > + err = device_open (device_master, D_READ, "pci", &pci_port);
> > + mach_port_deallocate (mach_task_self (), device_master);
> > + if (!err) {
> > + root = file_name_lookup_under (pci_port, ".",
> > + O_DIRECTORY | O_RDONLY |
> > O_EXEC, 0);
> > + device_close (pci_port);
> > + mach_port_deallocate (mach_task_self (), pci_port);
> > + }
>
> Err, this is breaking everything when pci-arbiter is not running as a
> bootstrap translator. In that case e.g. netdde succeeds getting the
> privileged port, and thus tries to open pci, but fails, and thus the
> whole thing aborts. What problem the older approach had?
I uploaded a version with that ordering fixed back to debian-ports, to
be seen on mirrors within about 6h.
Samuel
- Re: [PATCH] hurd: Implement device memory mapping, Samuel Thibault, 2022/01/02
- Re: [PATCH] hurd: Implement device memory mapping, Joan Lledó, 2022/01/05
- [PATCH] hurd: Implement device memory mapping, Joan Lledó, 2022/01/05
- Re: [PATCH] hurd: Implement device memory mapping, Samuel Thibault, 2022/01/08
- Re: [PATCH] hurd: Implement device memory mapping, Samuel Thibault, 2022/01/08
- Re: [PATCH] hurd: Implement device memory mapping,
Samuel Thibault <=
- Re: [PATCH] hurd: Implement device memory mapping, Joan Lledó, 2022/01/09
- Re: [PATCH] hurd: Implement device memory mapping, Samuel Thibault, 2022/01/09
- Re: [PATCH] hurd: Implement device memory mapping, Samuel Thibault, 2022/01/09
- Re: [PATCH] hurd: Implement device memory mapping, Joan Lledó, 2022/01/23
- Re: [PATCH] hurd: Implement device memory mapping, Samuel Thibault, 2022/01/23
[PATCH] pci-arbiter: Stop using deprecated region memory pointer, Joan Lledó, 2022/01/05