mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:47:35 +00:00
Kernel: Store device class name as member of VirtIO devices
This ensures we dont try to hold the PCI Access mutex under IRQ when printing VirtIO debug logs (which is not allowed and results in an assertion). This is also relatively free, as it requires no allocations (we're just storing a pointer to the rodata section).
This commit is contained in:
parent
53cf28c47c
commit
574a1c522d
2 changed files with 25 additions and 22 deletions
|
@ -82,7 +82,6 @@ struct Configuration {
|
|||
};
|
||||
|
||||
void detect();
|
||||
StringView determine_device_class(const PCI::Address& address);
|
||||
|
||||
class Device
|
||||
: public PCI::Device
|
||||
|
@ -235,6 +234,9 @@ private:
|
|||
|
||||
IOAddress m_io_base;
|
||||
MappedMMIO m_mmio[6];
|
||||
|
||||
StringView const m_class_name;
|
||||
|
||||
u16 m_queue_count { 0 };
|
||||
bool m_use_mmio { false };
|
||||
u8 m_status { 0 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue