[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1588130803-20527-9-git-send-email-iamjoonsoo.kim@lge.com>
Date: Wed, 29 Apr 2020 12:26:41 +0900
From: js1304@...il.com
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Vlastimil Babka <vbabka@...e.cz>,
Laura Abbott <labbott@...hat.com>,
"Aneesh Kumar K . V" <aneesh.kumar@...ux.ibm.com>,
Mel Gorman <mgorman@...hsingularity.net>,
Michal Hocko <mhocko@...e.com>,
Johannes Weiner <hannes@...xchg.org>,
Roman Gushchin <guro@...com>, Minchan Kim <minchan@...nel.org>,
Rik van Riel <riel@...riel.com>,
Christian Koenig <christian.koenig@....com>,
Huang Rui <ray.huang@....com>,
Eric Biederman <ebiederm@...ssion.com>,
"Rafael J . Wysocki" <rjw@...ysocki.net>,
Pavel Machek <pavel@....cz>, kernel-team@....com,
Christoph Hellwig <hch@...radead.org>,
Joonsoo Kim <iamjoonsoo.kim@....com>
Subject: [PATCH v2 08/10] mm/page_alloc: correct the use of is_highmem_idx()
From: Joonsoo Kim <iamjoonsoo.kim@....com>
What we'd like to check here is whether page has direct mapping or not.
Use PageHighMem() since it is perfectly matched for this purpose.
Acked-by: Roman Gushchin <guro@...com>
Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@....com>
---
mm/page_alloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 7fe5115..da473c7 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1399,7 +1399,7 @@ static void __meminit __init_single_page(struct page *page, unsigned long pfn,
INIT_LIST_HEAD(&page->lru);
#ifdef WANT_PAGE_VIRTUAL
/* The shift won't overflow because ZONE_NORMAL is below 4G. */
- if (!is_highmem_idx(zone))
+ if (!PageHighMem(page))
set_page_address(page, __va(pfn << PAGE_SHIFT));
#endif
}
--
2.7.4
Powered by blists - more mailing lists