From 95e65221aadee8e856ffa611e7b452b2daec9d79 Mon Sep 17 00:00:00 2001 From: Joonsoo Kim Date: Sat, 3 Nov 2012 11:42:23 +1100 Subject: [PATCH] mm, highmem: get virtual address of the page using PKMAP_ADDR() In flush_all_zero_pkmaps(), we have an index of the pkmap associated with the page. Using this index, we can simply get virtual address of the page. So change it. Signed-off-by: Joonsoo Kim Cc: Mel Gorman Reviewed-by: Minchan Kim Cc: Peter Zijlstra Signed-off-by: Andrew Morton --- mm/highmem.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/highmem.c b/mm/highmem.c index 91e80022aaad..c8be37619319 100644 --- a/mm/highmem.c +++ b/mm/highmem.c @@ -138,8 +138,7 @@ static unsigned int flush_all_zero_pkmaps(void) * 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]); set_page_address(page, NULL); if (index == PKMAP_INVALID_INDEX) -- 2.39.5