From: Joonsoo Kim Date: Sat, 3 Nov 2012 00:42:23 +0000 (+1100) Subject: mm, highmem: get virtual address of the page using PKMAP_ADDR() X-Git-Tag: next-20121107~2^2~153 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=451c64105f8ff96715401ecfae37eda8415434df;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)