aboutsummaryrefslogtreecommitdiff
path: root/src/vendorcode/cavium/bdk/libbdk-dram/bdk-dram-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vendorcode/cavium/bdk/libbdk-dram/bdk-dram-test.c')
-rw-r--r--src/vendorcode/cavium/bdk/libbdk-dram/bdk-dram-test.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/vendorcode/cavium/bdk/libbdk-dram/bdk-dram-test.c b/src/vendorcode/cavium/bdk/libbdk-dram/bdk-dram-test.c
index 5e6e4bcf11..9c78667116 100644
--- a/src/vendorcode/cavium/bdk/libbdk-dram/bdk-dram-test.c
+++ b/src/vendorcode/cavium/bdk/libbdk-dram/bdk-dram-test.c
@@ -101,9 +101,7 @@ static uint64_t dram_test_thread_size;
void __bdk_dram_flush_to_mem(uint64_t address)
{
BDK_MB;
- /* The DRAM code doesn't use the normal bdk_phys_to_ptr() because of the
- NULL check in it. This greatly slows down the memory tests */
- char *ptr = (void*)address;
+ char *ptr = bdk_phys_to_ptr(address);
BDK_CACHE_WBI_L2(ptr);
}
@@ -116,10 +114,8 @@ void __bdk_dram_flush_to_mem(uint64_t address)
*/
void __bdk_dram_flush_to_mem_range(uint64_t area, uint64_t max_address)
{
- /* The DRAM code doesn't use the normal bdk_phys_to_ptr() because of the
- NULL check in it. This greatly slows down the memory tests */
- char *ptr = (void*)area;
- char *end = (void*)max_address;
+ char *ptr = bdk_phys_to_ptr(area);
+ char *end = bdk_phys_to_ptr(max_address);
BDK_MB;
while (ptr < end)
{