From patchwork Wed Aug 22 03:07:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jia He X-Patchwork-Id: 10572569 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7BEEA921 for ; Wed, 22 Aug 2018 03:08:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 72BA32B113 for ; Wed, 22 Aug 2018 03:08:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 659442B179; Wed, 22 Aug 2018 03:08:06 +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,RCVD_IN_DNSWL_NONE 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 F1DC52B113 for ; Wed, 22 Aug 2018 03:08:05 +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=/y1S/2gYQPOJIko0jYkwhCfxD1TemM1QfymPKdg5hjM=; b=ILgczi+mw1mLhOIZf8/cgwHhCN Z4CY5jPyEgPSusDl7ZGYpC+WpjVZ9UpIGouQ2Vv9PIWD3wvE9Kfwm7oN7NIs/nqJmpxkQhBtdZ2Fi /ZWhxPNSYcHVlriwS4vtYkfSjfZlNYpJkCvxtxqjqXKOHPk6HRMBSWeNiluajYs8yfTmt44wWYnWJ fmIl8UVkZAxlK/HBgKBGps+LSrzIUmY8zmzeU4xtNupLqx4DPsz5IzfU3aPW6Hpavq5YTkktwNjD5 +nrMjngoC50oBbUWStAvErFJmYfMqHZZ3EJSDlafDWWYoNP89tj6V1Ej1hDRHsk2nCZxj1Del07jl 8Ut4fkHQ==; 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 1fsJV6-0004OU-Sq; Wed, 22 Aug 2018 03:08:04 +0000 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fsJV2-00046c-8M for linux-arm-kernel@lists.infradead.org; Wed, 22 Aug 2018 03:08:03 +0000 Received: by mail-pg1-x542.google.com with SMTP id v66-v6so259926pgb.10 for ; Tue, 21 Aug 2018 20:07:49 -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=qB8wQLRm567sPd0BwIEEQEjYlqnBOl4UOSs2cGebjxQ=; b=P/PJBkwEPMZUsM7aFZSoSuMyZ+ESKprPlOZTIvj+YyTLkNr053ypWmVga5VMc06/2c CR7+mhHGvNik5HsqSTOAxkq1GeZG0sVfo+S2jxkIr91Z4gB91raZ4efl4oEKTLvxc+6T AazzPIqEiuuzu3meJfA1z183Fmn7DymWkBSlrhml//oJ8A0LytS5b3RDIth6VZizrenq fzHYl+0CvECgT+OoM97SsDKLkOpItmsbEzbU2zlnpsz9ms6SqABXr3vO92lbxAYdhtbW 9O1Gye0QNq7JVhqpgqcLppc9JRgbtbLCtC3qAky/acYd7plrEAkAM/+HSGrGyrPVEa/Q 9nHQ== 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=qB8wQLRm567sPd0BwIEEQEjYlqnBOl4UOSs2cGebjxQ=; b=Mz4+FWVXju2/TKBy2gjn+zGVzUTYL0Q/G1vrDpfslSaec4KsUIcPmfcfH2F6MtOXgi 6VoQMd6oOQeSQAUAcNieAsP1BljTGrviC/UjJbEG3isrwUprm7u+dfDPWanqD6Jl/Ofw JJ2IFYZNQi0D5iC8WE8ydk6vYCfJl2BbY6QQi80FwtJ4TKwTxhKp4EsupPwn0042QZFv SdOpC1i/fRoXzN642ow5JZOgJ+SykzNMmKpmHIdLQ31aIt6AYAZH1VxzJWSS0wkCyDRR b7Ez+J22Shf8u6MK7ue1NxZ+8uBzq2Z/cE+VFmyFUjuZCvSHPB3T6PfncufL6HjzK10g sh5A== X-Gm-Message-State: AOUpUlFK6C7vDBmIvXimgVhr2iWjjhGS35nENeVaItrrOXnvon2ry6Xl howc8GWu16GCGlsVDt5y1kI= X-Google-Smtp-Source: AA+uWPzJBdDsbSrchc52klfb1DQ0wJelNefkYjsYYabOmrVH5TFk/ERFhQ9F0GfOux4D49sKOkvVLA== X-Received: by 2002:a63:4005:: with SMTP id n5-v6mr10897866pga.221.1534907269416; Tue, 21 Aug 2018 20:07:49 -0700 (PDT) Received: from ct7host.localdomain ([38.106.11.25]) by smtp.gmail.com with ESMTPSA id q7-v6sm440165pfq.43.2018.08.21.20.07.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Aug 2018 20:07:48 -0700 (PDT) From: Jia He X-Google-Original-From: Jia He To: Russell King , Catalin Marinas , Will Deacon , Mark Rutland , Ard Biesheuvel , Andrew Morton , Michal Hocko Subject: [PATCH v11 1/3] arm: arm64: introduce CONFIG_HAVE_MEMBLOCK_PFN_VALID Date: Wed, 22 Aug 2018 11:07:15 +0800 Message-Id: <1534907237-2982-2-git-send-email-jia.he@hxt-semitech.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1534907237-2982-1-git-send-email-jia.he@hxt-semitech.com> References: <1534907237-2982-1-git-send-email-jia.he@hxt-semitech.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180821_200800_592998_F5A4C248 X-CRM114-Status: GOOD ( 13.71 ) 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 , 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 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 | 1 + arch/arm64/Kconfig | 1 + mm/Kconfig | 3 +++ 3 files changed, 5 insertions(+) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 843edfd..d3c7705 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1641,6 +1641,7 @@ config ARCH_SELECT_MEMORY_MODEL config HAVE_ARCH_PFN_VALID def_bool ARCH_HAS_HOLES_MEMORYMODEL || !SPARSEMEM + select HAVE_MEMBLOCK_PFN_VALID config HAVE_GENERIC_GUP def_bool y diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 42c090c..d4119e6 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -777,6 +777,7 @@ config ARCH_SELECT_MEMORY_MODEL config HAVE_ARCH_PFN_VALID def_bool ARCH_HAS_HOLES_MEMORYMODEL || !SPARSEMEM + select HAVE_MEMBLOCK_PFN_VALID config HW_PERF_EVENTS def_bool y 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