[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH libpciaccess] hurd: Clients or nested arbiters don't touch ioport
From: |
Damien Zammit |
Subject: |
[PATCH libpciaccess] hurd: Clients or nested arbiters don't touch ioports |
Date: |
Tue, 23 Aug 2022 08:36:56 +0000 |
I tested this patch and linked it to both pci-arbiter.static
and rumpdisk.static, everything still works.
I/O ports are not needed at all by nested arbiters/clients of master
because we are not reserving them per device.
This design may need to change if we want to be more fine-grained
over i/o port access.
---
src/hurd_pci.c | 22 ++++++++++------------
1 file changed, 10 insertions(+), 12 deletions(-)
diff --git a/src/hurd_pci.c b/src/hurd_pci.c
index 2d10c5c..e7962a5 100644
--- a/src/hurd_pci.c
+++ b/src/hurd_pci.c
@@ -156,7 +156,6 @@ pci_system_hurd_destroy(void)
{
struct pci_system_hurd *pci_sys_hurd = (struct pci_system_hurd *)pci_sys;
- x86_disable_io();
mach_port_deallocate(mach_task_self(), pci_sys_hurd->root);
}
@@ -600,14 +599,14 @@ static const struct pci_system_methods hurd_pci_methods =
{
.read = pci_device_hurd_read,
.write = pci_device_hurd_write,
.fill_capabilities = pci_fill_capabilities_generic,
- .open_legacy_io = pci_device_x86_open_legacy_io,
- .close_io = pci_device_x86_close_io,
- .read32 = pci_device_x86_read32,
- .read16 = pci_device_x86_read16,
- .read8 = pci_device_x86_read8,
- .write32 = pci_device_x86_write32,
- .write16 = pci_device_x86_write16,
- .write8 = pci_device_x86_write8,
+ .open_legacy_io = NULL,
+ .close_io = NULL,
+ .read32 = NULL,
+ .read16 = NULL,
+ .read8 = NULL,
+ .write32 = NULL,
+ .write16 = NULL,
+ .write8 = NULL,
.map_legacy = pci_device_hurd_map_legacy,
.unmap_legacy = pci_device_hurd_unmap_legacy,
};
@@ -639,10 +638,9 @@ pci_system_hurd_create(void)
*/
pci_sys_hurd = calloc(1, sizeof(struct pci_system_hurd));
- if (pci_sys_hurd == NULL) {
- x86_disable_io();
+ if (pci_sys_hurd == NULL)
return ENOMEM;
- }
+
pci_sys = &pci_sys_hurd->system;
pci_sys->methods = &hurd_pci_methods;
--
2.34.1
- [PATCH libpciaccess] hurd: Clients or nested arbiters don't touch ioports,
Damien Zammit <=