From 91ccfa19a0cce887f39f4bc08e21e1f3f3bbcec1 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Thu, 24 Jul 2008 04:25:06 +0000 Subject: [PATCH] Added missing vm_put_physical_page() in do_io(). Something is still fishy though: Opening the dma_resources_test device in DiskProbe, the wrong data is shown. do_io() seems to be invoked with the correct physical address, vm_get_physical_page() succeeds, and after memcpy() the correct data are in the virtual address it returned, but db in the kernel debugger shows that the data in the physical page have not been changed. When quitting DiskProbe the "page still has mappings" assert is triggered for the page. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26602 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/tests/system/kernel/device_manager/dma_resource_test.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tests/system/kernel/device_manager/dma_resource_test.cpp b/src/tests/system/kernel/device_manager/dma_resource_test.cpp index f99a1befec..250e717ad7 100644 --- a/src/tests/system/kernel/device_manager/dma_resource_test.cpp +++ b/src/tests/system/kernel/device_manager/dma_resource_test.cpp @@ -191,6 +191,8 @@ do_io(void* data, IOOperation* operation) else memcpy(virtualAddress + pageOffset, disk + offset, toCopy); + vm_put_physical_page((addr_t)virtualAddress); + length -= toCopy; offset += toCopy; pageOffset = 0;