mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:48:12 +00:00
Kernel: Add UNMAP_AFTER_INIT to NVMe member functions
NVMeController, NVMeQueue and NVMeNameSpace had functions which are not used after init. So add them to UNMAP_AFTER_INIT section.
This commit is contained in:
parent
487377d1d7
commit
31c4c9724b
3 changed files with 12 additions and 12 deletions
|
@ -20,7 +20,7 @@ ErrorOr<NonnullRefPtr<NVMeQueue>> NVMeQueue::try_create(u16 qid, u8 irq, u32 q_d
|
|||
return queue;
|
||||
}
|
||||
|
||||
NVMeQueue::NVMeQueue(u16 qid, u8 irq, u32 q_depth, OwnPtr<Memory::Region> cq_dma_region, NonnullRefPtrVector<Memory::PhysicalPage> cq_dma_page, OwnPtr<Memory::Region> sq_dma_region, NonnullRefPtrVector<Memory::PhysicalPage> sq_dma_page, Memory::TypedMapping<volatile DoorbellRegister> db_regs)
|
||||
UNMAP_AFTER_INIT NVMeQueue::NVMeQueue(u16 qid, u8 irq, u32 q_depth, OwnPtr<Memory::Region> cq_dma_region, NonnullRefPtrVector<Memory::PhysicalPage> cq_dma_page, OwnPtr<Memory::Region> sq_dma_region, NonnullRefPtrVector<Memory::PhysicalPage> sq_dma_page, Memory::TypedMapping<volatile DoorbellRegister> db_regs)
|
||||
: IRQHandler(irq)
|
||||
, m_qid(qid)
|
||||
, m_admin_queue(qid == 0)
|
||||
|
@ -38,7 +38,7 @@ NVMeQueue::NVMeQueue(u16 qid, u8 irq, u32 q_depth, OwnPtr<Memory::Region> cq_dma
|
|||
m_cqe_array = { reinterpret_cast<NVMeCompletion*>(m_cq_dma_region->vaddr().as_ptr()), m_qdepth };
|
||||
}
|
||||
|
||||
ErrorOr<void> NVMeQueue::create()
|
||||
UNMAP_AFTER_INIT ErrorOr<void> NVMeQueue::create()
|
||||
{
|
||||
// DMA region for RW operation. For now the requests don't exceed more than 4096 bytes(Storage device takes of it)
|
||||
auto buffer = TRY(MM.allocate_dma_buffer_page("Admin CQ queue", Memory::Region::Access::ReadWrite, m_rw_dma_page));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue