From patchwork Wed Apr 11 07:21:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jia He X-Patchwork-Id: 10334939 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C9D4B60540 for ; Wed, 11 Apr 2018 07:23:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AFDD328716 for ; Wed, 11 Apr 2018 07:23:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A411E2871C; Wed, 11 Apr 2018 07:23:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 223552871B for ; Wed, 11 Apr 2018 07:23:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=RGJXV12+jZE+zN7cUaMzixUWwXj9JHIedjWqcjXuqpU=; b=avXkRqkEh+XKFX7JPSg/2Ph69U g91lJGhSfM1/GKRXrX6FQuVazfbXTTzOmP9eLeWleeYw2wlVXABBYe6kHPWqqaJQsdilYgFFP4f11 J6Co9tgUtHQVQHf/dBMp1LUd35MzII/gAHcSNmAEuJsOzuI2u/ABrm1cSp2r8R1/LDkJDjNCUOful HKwDDRwf5SL1ae055L3tMQnmzK/U4L3gr9NGnpjZiuM+hN6qo86m7Gjf4G9h4AABaHIM7fSs9xaw5 X9MPOSNKviOY5/nAtCgJAsxyU/D3Pzrr1vLANb48B2hdNzQ/dNG5LpSee5vTj6R6gjpohDVckqeJp vJOQ8bEg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1f6A6X-0002Ac-8B; Wed, 11 Apr 2018 07:23:41 +0000 Received: from mail-pl0-x241.google.com ([2607:f8b0:400e:c01::241]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f6A6F-0001sf-0q for linux-arm-kernel@lists.infradead.org; Wed, 11 Apr 2018 07:23:26 +0000 Received: by mail-pl0-x241.google.com with SMTP id a39-v6so724958pla.10 for ; Wed, 11 Apr 2018 00:23:12 -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=HnoyNxvcIsyELNz+ZUeFV3QLxqGs55qJv0QLMgpZCwA=; b=ezcQ0r/xE98aYjimfaRT4FcK5OdnZpn5fSCr9aXhxZ6K30eKn2X12l+HKE/Bfmm812 EYBK2MQBADhT6BDeQ0wf8sXiykoyVCtnfWJA3Tb2tX6j6fNzwwcLTi6zsOVvP35ON1Ma /lBkOVks7RE/tMVx7q5++vRtSH6PD/ezVqaX2xeldyDBWzyrG+EWRV4PgMzQ61usb/4G RvvNsrHsnzQ6VIlz5i4/lVu7lLKfDr6GR0940SlpAevsXUJQyicCvJ3dFMnOLqZ9oykC qCKyvMpZPvb5qU8olWAD9kp6NV7oHH1t25UTn+JUAC7uiOfRj0H2y48DGfMDc+a3pqDn 1+QQ== 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=HnoyNxvcIsyELNz+ZUeFV3QLxqGs55qJv0QLMgpZCwA=; b=Dy8bLvUYWNwieb6U9zvo7X10YP4w7gYPqOP46f6kRfrDwNZDnugT36r1hmoWGYd+xc xJ6sTKK3CB0xmzlGVyZYEfTceZr/7EIJ7vXSbPbNJvclNrUidIvKCVD0wmDTvLt7qIrm 3Q6dPpQjB63fraVxODcW5o5v83B2zJ3UIVwY1nn43uavu87silA182y3ofP1yQMxc96T NOyRymV2hFX506rPOvSp1ZW1CFhRClBYMsqAil46mp32DqnnZIOXK02cq/XS54JfiJbk fWxIXenfhmDxL62/5vDberX5bRFnw8pTOxB4dVamz0MG5v1kCtNlUNHCI0VDNsMTwe2s lsmA== X-Gm-Message-State: ALQs6tAK06N+9VW9eygvpjnyy5b/9fXEt9WFOCzXLPml1esnziJgguin ARiHLh8ItyhjGRMxatSuMew= X-Google-Smtp-Source: AIpwx48R4kdSQRwApy5LGaNBhZyK0OBLQnC1Zl2zLojF0AcLGHEdDZjpVkysXvwgBeUiREH6z90row== X-Received: by 2002:a17:902:d681:: with SMTP id v1-v6mr3955214ply.120.1523431392536; Wed, 11 Apr 2018 00:23:12 -0700 (PDT) Received: from localhost.localdomain ([38.106.11.25]) by smtp.gmail.com with ESMTPSA id o90sm1561898pfj.102.2018.04.11.00.23.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 11 Apr 2018 00:23:11 -0700 (PDT) From: Jia He To: Russell King , Catalin Marinas , Will Deacon , Mark Rutland , Ard Biesheuvel , Andrew Morton , Michal Hocko Subject: [PATCH v8 1/6] arm: arm64: introduce CONFIG_HAVE_MEMBLOCK_PFN_VALID Date: Wed, 11 Apr 2018 00:21:52 -0700 Message-Id: <1523431317-30612-2-git-send-email-hejianet@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523431317-30612-1-git-send-email-hejianet@gmail.com> References: <1523431317-30612-1-git-send-email-hejianet@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180411_002323_079610_1F379A63 X-CRM114-Status: GOOD ( 13.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gioh Kim , Wei Yang , linux-mm@kvack.org, Eugeniu Rosca , Petr Tesarik , Nikolay Borisov , Jia He , Pavel Tatashin , Daniel Jordan , AKASHI Takahiro , Vlastimil Babka , Andrey Ryabinin , Laura Abbott , Daniel Vacek , Mel Gorman , Vladimir Murzin , Kees Cook , Philip Derrin , YASUAKI ISHIMATSU , Jia He , Kemi Wang , linux-arm-kernel@lists.infradead.org, Steve Capper , linux-kernel@vger.kernel.org, James Morse , Johannes Weiner MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Make CONFIG_HAVE_MEMBLOCK_PFN_VALID a config option so it can move memblock_next_valid_pfn to generic code file. arm/arm64 can benefit from this booting time improvement. Signed-off-by: Jia He --- 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 51c8df5..77bc1bb 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1637,6 +1637,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 c9a7e9e..f374203 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -747,6 +747,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 c782e8f..c53ac38 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