]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm, highmem: get virtual address of the page using PKMAP_ADDR()
authorJoonsoo Kim <js1304@gmail.com>
Fri, 9 Nov 2012 03:04:08 +0000 (14:04 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 9 Nov 2012 03:08:37 +0000 (14:08 +1100)
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 <js1304@gmail.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Reviewed-by: Minchan Kim <minchan@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/highmem.c

index 91e80022aaad72a5c1ccb3b784ec19bd841d17a0..c8be376193192d152b1fa473e62c0942c41bdff2 100644 (file)
@@ -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)