Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp1514800imm; Fri, 6 Jul 2018 01:17:28 -0700 (PDT) X-Google-Smtp-Source: AAOMgpewNWxAECR+NmF9rKboYA9pSe44k8X9JfnRX0+5RPqsI0KikxUIow7h3/r2l4StjMjo5VUY X-Received: by 2002:a17:902:3f81:: with SMTP id a1-v6mr9386756pld.29.1530865048841; Fri, 06 Jul 2018 01:17:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530865048; cv=none; d=google.com; s=arc-20160816; b=ECIv0Llc6fnAesb1Gm2raxSL3jwrXTdDEPbIBBZYCUFjhmKXi2BveliXkeT7MZRhdB ys2k+V/7OIigZIRb2M7Sb0jpEDATG23TcdOcumuB+MwbffmpI59aOgvL6lL09Bdh/APh NsnUt4ZtCwlw+rgLewgfNTXMg+CRi3dtfElSMq+3OBAqzkydRe3fzsIeUxmhkn0TlZFY sc6fclS80QWVM0yEy3kwC2CVImwiEr5dsPL4lvgPTc06Ql+bQvlMc+kRtfVOqCfEPg87 WC+ZV8XCuM5ydorDBenWy736nLepmTdXbrlZLAf6JenWL8WFwwOcNKImlo44nXc63boZ X6jw== 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:arc-authentication-results; bh=KPtnS3pR0e6k1wruvZ/TmyKB2yqnQlAi9FUL26a/INc=; b=Ksn5AOaiUeQsIDMPXFN+PbxBaRBTQmDJ8sIWIghJPP/prdFyM+iut3PvxiAbKUZGwL xLhIQHV5o/zKJJTUqDH2h0MgZBqjiJ0zy9aysG2U4OXTBZ0zfc6+SL1boaxkcaZngljE i9d0c58K8WgQOysDynliwaXtfkLzy82ZanCkMSdHMy7EJX+sU28WCx58UPbYdqE3//2o bLpU2/t9COp1C2vIQgpY7Bjria8Z2dInh5AzaCsanVkiIFqzW+lfuCWkWOeLeaFdnbL5 lcgQaaRqXcFr/QBg1kDT539Beqau3E1vkh2zSx8b4BPwWAhXpzhLy7Nrzrfy3V2pTWPN BYLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kNFYHImM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id u15-v6si8323585pfa.28.2018.07.06.01.17.14; Fri, 06 Jul 2018 01:17:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kNFYHImM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1753729AbeGFIPE (ORCPT + 99 others); Fri, 6 Jul 2018 04:15:04 -0400 Received: from mail-pl0-f66.google.com ([209.85.160.66]:41139 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753688AbeGFIPA (ORCPT ); Fri, 6 Jul 2018 04:15:00 -0400 Received: by mail-pl0-f66.google.com with SMTP id w8-v6so2531138ply.8 for ; Fri, 06 Jul 2018 01:15:00 -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=KPtnS3pR0e6k1wruvZ/TmyKB2yqnQlAi9FUL26a/INc=; b=kNFYHImMC/45MdigANa2QLU2iw0muDk6UGej7TqyveuZfNRAXHnQFN2McdRcAPu/oB Z2ySewh42xNfvOo7i1Q5jJwC+WwimW1Ikdot9PFzkpODnynjtVax9K04wiubC/vOi2Cj FRDWw3lpTTR/8i4Jof3PGyebe1EBjjYY7t7I0YZpw+5u9pMAcaMFdLG4fRVLbti/6j+w lMddoaJNGKTyVW79OeMOpj5dq/xJs+AQHV+Ez1RTxHMgpQAG9/fQNPZpxuU9R4k5KqnC 2/tvVwwqzaHYNqWVI0GwgLMkyC9b9AHmP5S5i6BLIA7KoRScLuHC+heeIKqYoZq8p8Au /1Fg== 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=KPtnS3pR0e6k1wruvZ/TmyKB2yqnQlAi9FUL26a/INc=; b=kAFyQgnkRA0MD/8XZbYX1TdjB7wb1VwtV6biYp7jfCObniSOGYP+xP0l18KHYdU0J0 8qexvPn0aJ1p+tJNZsuROz7o64JIlbTgI4+QadKjIKGu7ctZscsun+fhOa42BindGX9F V3CEAFuRFSfmuhwl6wWPmdnzbS0WUUVG8t6YR6IUxr30LG00PTAWtaJxK08VNNFIIjjE lTeCiKObAuUGjMmfr7/22bjdF7sIgl6NIXgIhIvaYs+yaiGM/tv/iYS18b0CKawcHtJo X0GWpYmB+kIlS2Z3M0kglBDSvYVjevelJj9wqoU+0Q1GJfDkP9W0RMP1anH5R+jRjj1v D3zg== X-Gm-Message-State: APt69E3N0LyA/nELTSwMw7KYKyG7WOy1wsZPoOXs27lr1NgAG3hZ9t6W k3C3NIEoJTJ4Nz3dX4rcaF4= X-Received: by 2002:a17:902:8d96:: with SMTP id v22-v6mr9248199plo.176.1530864900341; Fri, 06 Jul 2018 01:15:00 -0700 (PDT) Received: from ct7host.localdomain ([38.106.11.25]) by smtp.gmail.com with ESMTPSA id c141-v6sm4673049pfc.25.2018.07.06.01.14.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Jul 2018 01:14:59 -0700 (PDT) From: Jia He To: Russell King , Andrew Morton , Michal Hocko , Catalin Marinas , Mel Gorman , Will Deacon , Mark Rutland , "H. Peter Anvin" Cc: Pavel Tatashin , Daniel Jordan , AKASHI Takahiro , Gioh Kim , Steven Sistare , Daniel Vacek , Eugeniu Rosca , Vlastimil Babka , linux-kernel@vger.kernel.org, linux-mm@kvack.org, James Morse , Ard Biesheuvel , Steve Capper , Thomas Gleixner , Ingo Molnar , Greg Kroah-Hartman , Kate Stewart , Philippe Ombredanne , Johannes Weiner , Kemi Wang , Petr Tesarik , YASUAKI ISHIMATSU , Andrey Ryabinin , Nikolay Borisov , richard.weiyang@gmail.com, Jia He , Jia He Subject: [PATCH v10 1/6] arm: arm64: introduce CONFIG_HAVE_MEMBLOCK_PFN_VALID Date: Fri, 6 Jul 2018 16:14:15 +0800 Message-Id: <1530864860-7671-2-git-send-email-hejianet@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1530864860-7671-1-git-send-email-hejianet@gmail.com> References: <1530864860-7671-1-git-send-email-hejianet@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Make CONFIG_HAVE_MEMBLOCK_PFN_VALID a new config option so it can move memblock_next_valid_pfn to generic code file. All the latter optimizations are based on this config. The memblock initialization time on arm/arm64 can benefit from this. Signed-off-by: Jia He Reviewed-by: Pavel Tatashin --- arch/arm/Kconfig | 4 ++++ arch/arm64/Kconfig | 4 ++++ mm/Kconfig | 3 +++ 3 files changed, 11 insertions(+) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 843edfd..7ea2636 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1642,6 +1642,10 @@ config ARCH_SELECT_MEMORY_MODEL config HAVE_ARCH_PFN_VALID def_bool ARCH_HAS_HOLES_MEMORYMODEL || !SPARSEMEM +config HAVE_MEMBLOCK_PFN_VALID + def_bool y + depends on HAVE_ARCH_PFN_VALID + config HAVE_GENERIC_GUP def_bool y depends on ARM_LPAE diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 42c090c..26d75f4 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -778,6 +778,10 @@ config ARCH_SELECT_MEMORY_MODEL config HAVE_ARCH_PFN_VALID def_bool ARCH_HAS_HOLES_MEMORYMODEL || !SPARSEMEM +config HAVE_MEMBLOCK_PFN_VALID + def_bool y + depends on HAVE_ARCH_PFN_VALID + config HW_PERF_EVENTS def_bool y depends on ARM_PMU diff --git a/mm/Kconfig b/mm/Kconfig index 94af022..28fcf54 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -137,6 +137,9 @@ config HAVE_MEMBLOCK_NODE_MAP config HAVE_MEMBLOCK_PHYS_MAP bool +config HAVE_MEMBLOCK_PFN_VALID + bool + config HAVE_GENERIC_GUP bool -- 1.8.3.1