Created
August 26, 2017 22:03
-
-
Save lategoodbye/7922e7d08166f5daf43cf66aa738a5dc to your computer and use it in GitHub Desktop.
Make VCHIQ functional test work with HIGHMEM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | |
index 0159ca4..be08849 100644 | |
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | |
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | |
@@ -612,18 +612,20 @@ free_pagelist(struct vchiq_pagelist_info *pagelistinfo, | |
if (head_bytes > actual) | |
head_bytes = actual; | |
- memcpy((char *)page_address(pages[0]) + | |
+ memcpy((char *)kmap(pages[0]) + | |
pagelist->offset, | |
fragments, | |
head_bytes); | |
+ kunmap(pages[0]); | |
} | |
if ((actual >= 0) && (head_bytes < actual) && | |
(tail_bytes != 0)) { | |
- memcpy((char *)page_address(pages[num_pages - 1]) + | |
+ memcpy((char *)kmap(pages[num_pages - 1]) + | |
((pagelist->offset + actual) & | |
(PAGE_SIZE - 1) & ~(g_cache_line_size - 1)), | |
fragments + g_cache_line_size, | |
tail_bytes); | |
+ kunmap(pages[num_pages - 1]); | |
} | |
down(&g_free_fragments_mutex); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment