[PATCH 7/7] highmem: avoid page_address() in flush_all_zero_pkmaps()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We can get the virtual address from PKMAP_ADDR(i),
we don't need to call page_address() here.

Signed-off-by: Lai Jiangshan <laijs@xxxxxxxxxxxxxx>
---
 mm/highmem.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/mm/highmem.c b/mm/highmem.c
index 6f028cb..994fd68 100644
--- a/mm/highmem.c
+++ b/mm/highmem.c
@@ -103,8 +103,6 @@ static void flush_all_zero_pkmaps(void)
 	flush_cache_kmaps();
 
 	for (i = 0; i < LAST_PKMAP; i++) {
-		struct page *page;
-
 		/*
 		 * zero means we don't have anything to do,
 		 * >1 means that it is still in use. Only
@@ -125,9 +123,7 @@ static void flush_all_zero_pkmaps(void)
 		 * getting the kmap_lock (which is held here).
 		 * So no dangers, even with speculative execution.
 		 */
-		page = pte_page(pkmap_page_table[i]);
-		pte_clear(&init_mm, (unsigned long)page_address(page),
-			  &pkmap_page_table[i]);
+		pte_clear(&init_mm, PKMAP_ADDR(i), &pkmap_page_table[i]);
 
 		clear_high_page_map(i);
 		need_flush = 1;
-- 
1.7.7

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]