diff options
author | Joonsoo Kim <js1304@gmail.com> | 2012-12-11 19:01:24 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-11 20:22:24 -0500 |
commit | eb2db439a3203ae86c35ad277ac4a3268a94baa1 (patch) | |
tree | a36bb544c2252468b91f10495915015e05ddde68 /mm/highmem.c | |
parent | a354e2c84eeebcd7d7bbdd71216895b8e9866b5c (diff) |
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 <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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/highmem.c')
-rw-r--r-- | mm/highmem.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/highmem.c b/mm/highmem.c index 4d6f96c20191..d999077431df 100644 --- a/mm/highmem.c +++ b/mm/highmem.c | |||
@@ -137,8 +137,7 @@ static void flush_all_zero_pkmaps(void) | |||
137 | * So no dangers, even with speculative execution. | 137 | * So no dangers, even with speculative execution. |
138 | */ | 138 | */ |
139 | page = pte_page(pkmap_page_table[i]); | 139 | page = pte_page(pkmap_page_table[i]); |
140 | pte_clear(&init_mm, (unsigned long)page_address(page), | 140 | pte_clear(&init_mm, PKMAP_ADDR(i), &pkmap_page_table[i]); |
141 | &pkmap_page_table[i]); | ||
142 | 141 | ||
143 | set_page_address(page, NULL); | 142 | set_page_address(page, NULL); |
144 | need_flush = 1; | 143 | need_flush = 1; |