From: Joonsoo Kim Date: Fri, 9 Nov 2012 03:04:08 +0000 (+1100) Subject: mm, highmem: get virtual address of the page using PKMAP_ADDR() X-Git-Tag: next-20121112~5^2~225 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=bbb50e4c895fb25b90b041607f590b2f8698ab34;p=karo-tx-linux.git 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 --- 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)