From: Joonsoo Kim Date: Wed, 12 Dec 2012 00:01:24 +0000 (-0800) Subject: mm, highmem: get virtual address of the page using PKMAP_ADDR() X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=eb2db439a3203ae86c35ad277ac4a3268a94baa1;p=~shefty%2Frdma-dev.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 Signed-off-by: Linus Torvalds --- diff --git a/mm/highmem.c b/mm/highmem.c index 4d6f96c2019..d999077431d 100644 --- a/mm/highmem.c +++ b/mm/highmem.c @@ -137,8 +137,7 @@ static void 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); need_flush = 1;