Messages in this thread Patch in this message | | | From | Lai Jiangshan <> | Subject | [PATCH 7/7] highmem: avoid page_address() in flush_all_zero_pkmaps() | Date | Wed, 6 Jun 2012 16:15:01 +0800 |
| |
We can get the virtual address from PKMAP_ADDR(i), we don't need to call page_address() here.
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> --- mm/highmem.c | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/mm/highmem.c b/mm/highmem.c index 6f028cb..994fd68 100644 --- a/mm/highmem.c +++ b/mm/highmem.c @@ -103,8 +103,6 @@ static void flush_all_zero_pkmaps(void) flush_cache_kmaps(); for (i = 0; i < LAST_PKMAP; i++) { - struct page *page; - /* * zero means we don't have anything to do, * >1 means that it is still in use. Only @@ -125,9 +123,7 @@ static void flush_all_zero_pkmaps(void) * getting the kmap_lock (which is held here). * 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]); clear_high_page_map(i); need_flush = 1; -- 1.7.7
| |