Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3365875ybz; Mon, 20 Apr 2020 01:03:24 -0700 (PDT) X-Google-Smtp-Source: APiQypIgwop1Ir7ntwRv5+Z3rIMoYpfO4oXAYYww7yIQSKCJ3LUrL00T8FiZrhD9q5sfaUz6X9ih X-Received: by 2002:a05:6402:b03:: with SMTP id bm3mr12694940edb.299.1587369804406; Mon, 20 Apr 2020 01:03:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587369804; cv=none; d=google.com; s=arc-20160816; b=Q49+f/jGYv92VSeCeklCSJpOrG160JC4cUWS4WIL5tfgRIY/j+tp3D1zO1j2t0PjNk Rl5pRbuDTQN9r5BMMKYF0qS2jxh/3Csr6avMDlgDKVq7zhmfLiBJKdqJHGDg1bV/sE2i w5ol6WHa+fyuc2HviiRZeqaHjup5Ewj9Eca/wxa4ydCj1V0vb/ltVeQ1U5L6Euh2rAvn Eiza1LkghRzOhayrrwvKIKqEJdEIdCdmSErHeKs840HvCQuPQ+0Vpu8BHCKdpgJI0opj xIc/xGY2jP1R5yut963nF/AzyPibmMx7Jrq0K7ovDCrkrt12I5kDZvSHbB3al/V/SENO cOnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=3sIc/9DDAXKMYRBsv64/To7rDNyZRnaOfPvxZnOJWw0=; b=kCgzX+q2bERK+0Y9UPdcOLliRpaGZw9jJQmygVTPZ859Gz4/cgE1B64ORghXCqBzN+ M2O74QEC0U6TOjVDzWg5NxRO2PLu8/ioxUPigQsxMsjBjhe1zAaARAC5gpQrdEWuWtJh vxtul81uxzLKRscwZeyYgF/l70vdoxzjJCc6JnK7weZpeKinMqKrYS+Es/coUZl87+QA jx59+VptzbkcwdZTpPGC5VS94Z4iNTf7BrJZ4vWKSkmp5yVMQy4yMJQ61VwbYsvMBbd7 cq5GpfN6uLy5nvohr1RsT8GT1HbM4wIuWJkODdGuTVmvGqt3Y8xENast/rBVUgQGSAKS wmXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=W4H+9z7K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z1si108309edp.481.2020.04.20.01.03.02; Mon, 20 Apr 2020 01:03:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=W4H+9z7K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726450AbgDTIBH (ORCPT + 99 others); Mon, 20 Apr 2020 04:01:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725815AbgDTIBG (ORCPT ); Mon, 20 Apr 2020 04:01:06 -0400 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D7C6C061A0C for ; Mon, 20 Apr 2020 01:01:06 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id kb16so4229145pjb.1 for ; Mon, 20 Apr 2020 01:01:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=3sIc/9DDAXKMYRBsv64/To7rDNyZRnaOfPvxZnOJWw0=; b=W4H+9z7KpXVaJoSsLGidF0McaGPT/JauXtbjVyABdYzu78ZKOjCTK+mQ6b28MkRA9M ZcdVu+Gt+H2BiYtsZ9IbBef+c3FdwRJ/VbeMPC9s62wlMA4oY4S8i5JZrRkBUinh05gY kBXBV7FFzDJOPUCTfWbO7D+kuk5t7Ch4XYJsaA2GBu6roPdoGq+doypS+LmDGK7t2tFJ sYXjv1BUogESKtLi6d7znXOFetnpn0/V00wIlxhx0ZY3XA2DfQpas0L7IePNeYfnYCaT fytNPBIoIhh9L5NIJaB0PCCbQOegkEaTSRFddqLQHKLRtn7KoSPmcnJsjJfa7D172psD q7ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=3sIc/9DDAXKMYRBsv64/To7rDNyZRnaOfPvxZnOJWw0=; b=f83i7eJRlA9G4aA3rtbhZ5aYdI8dgkXeuRZCSXhGfc4Bxzkw1mVmI3EKcNdpNgI2D9 dxk81BP9aQBz11/ALp5xIyBc+ci7dtHXJpogNsTFIoI9emxVBd6UiY0PeaPZg/tf5oAv S1bI0sj4kw/cwY+V2cs3Vnq05GjN2S7jEeUbNDkjf0pG5SMXQQZ+YmkGIAwtl4onUB2C mQRH+OxjLD4jVfYN4VsUaXmoS1HYpJzpITkfOtgoU0SXNuQ8x6Y6LTv+gUy1MoWzEZKd i8dplyOR85uzDJcOKVAdOMnAXPMygsRBxmsgCIipx8wbgjxE5NqfgHP8s+7B8+CDH3Gs foKw== X-Gm-Message-State: AGi0PuYd3Yc8SnYWxdIwtXZYD52a12t1NXuVCILCe5K4FVADZWoOV+xA 2wCvyn49/n4tVYGu5sS8Sa3w3NWHnJI= X-Received: by 2002:a17:902:20b:: with SMTP id 11mr14153835plc.209.1587369665788; Mon, 20 Apr 2020 01:01:05 -0700 (PDT) Received: from localhost.localdomain ([114.206.198.176]) by smtp.gmail.com with ESMTPSA id n9sm314947pjt.29.2020.04.20.01.01.01 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Apr 2020 01:01:05 -0700 (PDT) From: js1304@gmail.com X-Google-Original-From: iamjoonsoo.kim@lge.com To: Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Vlastimil Babka , Laura Abbott , "Aneesh Kumar K . V" , Mel Gorman , Michal Hocko , Johannes Weiner , Roman Gushchin , Minchan Kim , Rik van Riel , Christian Koenig , Huang Rui , Eric Biederman , "Rafael J . Wysocki" , Pavel Machek , Joonsoo Kim Subject: [PATCH 09/10] mm/page_alloc: correct the use of is_highmem_idx() Date: Mon, 20 Apr 2020 16:59:41 +0900 Message-Id: <1587369582-3882-10-git-send-email-iamjoonsoo.kim@lge.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1587369582-3882-1-git-send-email-iamjoonsoo.kim@lge.com> References: <1587369582-3882-1-git-send-email-iamjoonsoo.kim@lge.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Joonsoo Kim 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. Signed-off-by: Joonsoo Kim --- 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 9997f87..e07148d 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