mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:38:11 +00:00
Kernel/PCI: Cache interrupt line and interrupt pin of a device
This allows us to remove the PCI::get_interrupt_line API function. As a result, this removes a bunch of not so great patterns that we used to cache PCI interrupt line in many IRQHandler derived classes instead of just using interrupt_number method of IRQHandler class.
This commit is contained in:
parent
057f5a12c2
commit
a411a44fda
17 changed files with 43 additions and 39 deletions
|
@ -388,7 +388,9 @@ UNMAP_AFTER_INIT void Access::enumerate_functions(int type, u8 bus, u8 device, u
|
|||
RevisionID revision_id = read8_field(address, PCI_REVISION_ID);
|
||||
SubsystemID subsystem_id = read16_field(address, PCI_SUBSYSTEM_ID);
|
||||
SubsystemVendorID subsystem_vendor_id = read16_field(address, PCI_SUBSYSTEM_VENDOR_ID);
|
||||
m_device_identifiers.append(DeviceIdentifier { address, id, revision_id, class_code, subclass_code, prog_if, subsystem_id, subsystem_vendor_id, get_capabilities(address) });
|
||||
InterruptLine interrupt_line = read8_field(address, PCI_INTERRUPT_LINE);
|
||||
InterruptPin interrupt_pin = read8_field(address, PCI_INTERRUPT_PIN);
|
||||
m_device_identifiers.append(DeviceIdentifier { address, id, revision_id, class_code, subclass_code, prog_if, subsystem_id, subsystem_vendor_id, interrupt_line, interrupt_pin, get_capabilities(address) });
|
||||
}
|
||||
|
||||
if (read_type == PCI_TYPE_BRIDGE && recursive && (!m_enumerated_buses.get(read8_field(address, PCI_SECONDARY_BUS)))) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue