1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:47:34 +00:00

Kernel/PCI: Remove InterruptDisabler usage

Instead, just ensure we pick the m_access_lock and then m_scan_lock when
doing a scan/re-scan of the PCI configuration space so we know nobody
can actually access the PCI configuration space during the scan.

The m_scan_lock is now a Spinlock, to ensure we cannot yield to other
process while we do the PCI configuration space scanning.
This commit is contained in:
Liav A 2021-10-22 20:43:33 +03:00 committed by Andreas Kling
parent 72e831e9e9
commit 8e55c4bfaf
2 changed files with 7 additions and 6 deletions

View file

@ -11,6 +11,7 @@
#include <AK/Vector.h>
#include <Kernel/Bus/PCI/Definitions.h>
#include <Kernel/FileSystem/SysFS.h>
#include <Kernel/Locking/Spinlock.h>
namespace Kernel::PCI {
@ -82,7 +83,7 @@ private:
// General Data-members
mutable Mutex m_access_lock;
mutable Mutex m_scan_lock;
mutable Spinlock m_scan_lock;
Bitmap m_enumerated_buses;
AccessType m_access_type;
Vector<DeviceIdentifier> m_device_identifiers;