diff options
author | Patrick Williams <iawillia@us.ibm.com> | 2012-12-13 12:57:31 -0600 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2012-12-14 10:22:56 -0600 |
commit | df8e246c1afd3c5e63a7cead8db40b7b0fc0837a (patch) | |
tree | 6db610db0f7e7aba141d0eb1751b30a5c4213777 /src | |
parent | da3888270ff596441bf78535c26dee0a7d923145 (diff) | |
download | talos-hostboot-df8e246c1afd3c5e63a7cead8db40b7b0fc0837a.tar.gz talos-hostboot-df8e246c1afd3c5e63a7cead8db40b7b0fc0837a.zip |
Reduce system calls in mbox DMAs.
Change-Id: I50ba269ee616790d8daaa8a25fea5a3bad3a6b7e
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/2681
Tested-by: Jenkins Server
Reviewed-by: Dean Sanner <dsanner@us.ibm.com>
Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/usr/mbox/mbox_dma_buffer.H | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/usr/mbox/mbox_dma_buffer.H b/src/usr/mbox/mbox_dma_buffer.H index dc4e86af3..0f39b7c27 100644 --- a/src/usr/mbox/mbox_dma_buffer.H +++ b/src/usr/mbox/mbox_dma_buffer.H @@ -43,12 +43,12 @@ namespace MBOX DmaBuffer(); ~DmaBuffer(); - + /** * Get DMA buffer space * @param[in/out] io_size, size in bytes of space needed, * 0 means get all available buffers - * bit map is returned showing blocks + * bit map is returned showing blocks * aquired. * * @note: There are 64 total buffers in the shared DMA pool. The @@ -103,7 +103,7 @@ namespace MBOX uint64_t address = reinterpret_cast<uint64_t>(i_address); return (address >= VmmManager::MBOX_DMA_ADDR && - address < (VmmManager::MBOX_DMA_ADDR + + address < (VmmManager::MBOX_DMA_ADDR + (VmmManager::MBOX_DMA_PAGES * VmmManager::MBOX_DMA_PAGESIZE))); } @@ -116,7 +116,9 @@ namespace MBOX ALWAYS_INLINE uint64_t toPhysAddr(void * i_address) const { - return mm_virt_to_phys(i_address); + return iv_phys_head + + (reinterpret_cast<uint64_t>(i_address) - + reinterpret_cast<uint64_t>(iv_head)); } /** |