IRC channel logs

2023-06-26.log

back to list of logs

<damo22>looks like we need to implement some kind of OSPM:
<damo22>Once an OSPM-compatible operating system activates ACPI, it takes exclusive control of all aspects of power management and device configuration. The OSPM implementation must expose an ACPI-compatible environment to device drivers, which exposes certain system, device and processor states.
<damo22>that would probably include setting a non-conflicting IRQ configuration
<youpi>conflicting IRQ shouldn't be a problem
<youpi>nowaydays' drivers cope with that completely fine
<damo22>are you sure? i think linux sets everything to a different irq
<youpi>it doesn't
<youpi>I mean, it's more performant to avoid sharing an IRQ
<youpi>but sharing is supported
<damo22>it uses MSI interrupts, they are different per device
<youpi> 16: 0 0 0 0 9891 0 0 0 IR-IO-APIC 16-fasteoi i801_smbus, idma64.0, i2c_designware.0
<youpi>I have various devices on that irq for instance
<damo22>ok
<damo22>so then its a bug in gnumach if sharing is not working
<damo22>my patch for libacpica fixes the reported irqs, i will address the review points
<damo22>booting off usb will be exciting once this is all fixed
<damo22>youpi1: i know why netdde interrupt sharing does not work:
<damo22> // TODO the flags for shared irq should be indicated by params->shared.
<damo22> // Flags needs to be 0 for new irq interface for now.
<damo22> // Otherwise, the interrupt handler cannot be installed in the kernel.
<damo22> ret = device_intr_register (irq_dev, my_index,
<damo22> 0, delivery_port,
<damo22> MACH_MSG_TYPE_MAKE_SEND);
<damo22>not sure why it needs to be 0 to work
<damo22>this is in libddekit
<damo22>it should be SA_SHIRQ ?
<damo22>0x04000000
<damo22>hmm no
<damo22>flags |= SA_SHIRQ; is executed in the non-LINUX_DEV pathway but when LINUX_DEV is defined in gnumach, the linux code does action->flags = SA_SHIRQ;
<damo22>so the passed in flag should not even matter if its zero...
<damo22> if (action && (action->flags & SA_INTERRUPT))
<damo22> cli ();
<damo22>does SA_INTERRUPT need to be set as well?
<damo22>otherwise interrupts are not disabled while the handler is being installed
<damo22>s/installed/run
<damo22>it doesnt make sense, both netdde and rumpdisk use the new style rpc for device_intr_register() in userspace so why isnt the irq sharing working?
<damo22>when i compiled usb stack into rumpdisk, it should just share irqs between netdde and usb
<damo22>youpi1: is it possible that netdde linux drivers are not compatible with irq sharing?
<youpi1>probably not, that's a quite recent take of linux drivers, SHIRQ should be supported there
<youpi1>but what is actually the symptom?
<youpi1>in principle the drivers themselves shouldn't be able to disturb each other, at worse they'd get stuck
<damo22>yeah it gets stuck
<youpi1>possibly gnumach misses notifying all drivers
<youpi1>do both get stuck?
<damo22>i think so, nothing happens
<youpi1>possibly gnumach mishandles the acks, and misses re-enable the interrupt
<damo22>eg, when i shut down the machine
<damo22>it cant release dhcp
<damo22>nothing happens
<damo22>the usb controller and network card has the same irq 11