Received: by 10.192.165.156 with SMTP id m28csp394453imm; Wed, 11 Apr 2018 00:26:56 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+ZuXEP7/mxrsb+KxvKPn+WXSvS7tQFCMMY8IdxEPrYWm/JmTEri25yvib6/5hprdVP0S0N X-Received: by 10.101.66.203 with SMTP id l11mr2555650pgp.371.1523431616169; Wed, 11 Apr 2018 00:26:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523431616; cv=none; d=google.com; s=arc-20160816; b=Fsa9zQb6uM/gVSPXKgz70LraNt1IMq7Ba2mGbTxu1zn0+bv+F+9pvlc1ru5KqS1+YI 8XEwWAW9JKcQ1rheBbby9iMLigIXoku5l8wU6RkHKYO+KWo1kcimIVeaxbxPsValsJvj gVgXhoLDsns+JiCANd7wNGaVz8MkHNpvHJlsL9A7zN1BFpXwbAO3lEV+3irA/nAwWW1b oNuH/BrA8FxRaoH72aaoEXyNuupniutRuLmWq5BZNz8rHuhh2d2F0fi7LCfh+zLAV/eq TysRK3i8KFKzfxG6Jzf0040Ead7io5r4AWm/kGj6gSmzZb2DuX9jYmBgVzf8aINbOQOb mt4w== 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=HnoyNxvcIsyELNz+ZUeFV3QLxqGs55qJv0QLMgpZCwA=; b=n4luszbQC8P1BLw0dYILPw/QGC+6zV0WFTJU1eI3NrZdsIyHN2jmSrRoJrbNe0+xlV PRsfimLzeZ1MAX7Qnh0WghfdBpXMIBA9a+AoXTFR+XzxbzvTgZ7VK2PfPcdp9qZLHl2K G9omLiq+y4m+BsrV2qJE4Avg8pYlMffN652urM20B8WL0y2p8EDHKo1j6bbeJFuyi3OM A3XBhCbwOZCEYR9StCBczH39P4BVv4K75b9dognS6xjxn8DJG1JfkKweB3SY8zU4wnU/ bNmSpp6mDF3wY1amvq9z3P3ClOL8BcWhHDG5Lr8zV5TDtrlaeXDMS17J3nskiCfnG8/D Z6Cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ezcQ0r/x; 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 z11-v6si557559plo.243.2018.04.11.00.26.18; Wed, 11 Apr 2018 00:26:56 -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=ezcQ0r/x; 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 S1752569AbeDKHXP (ORCPT + 99 others); Wed, 11 Apr 2018 03:23:15 -0400 Received: from mail-pl0-f66.google.com ([209.85.160.66]:44087 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751755AbeDKHXM (ORCPT ); Wed, 11 Apr 2018 03:23:12 -0400 Received: by mail-pl0-f66.google.com with SMTP id b6-v6so727308pla.11 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=OB0tM4KsI10WudLwbDufdqfNzKhTcnfnHwBcyXTUXgp073RXeZaQjwRzKfRasNZS37 wwbbsm3lQy86+YEPb+noxqjTYOCreRTJ4ZvyiKATWBe4284tD3IsBpFC1z79sLM9H94X EUfgG/PkFAxp3PaCJETEu5cXYrUiNQGZ3EtpiTXp3Y3olYF2r27fdIM9/CH5ffm+UqEO 8Oh/vvWgTTMe++PjV0QP6kpay85lpwhg/JhHxyU7mO3eQpUVjYerphBG5BufSJXB14y5 6OyB6Cf6yp4nYeXheXSlC4NOE2wguDIV5IdgFI8P0agTjM0czrEab1KpN9S0mtNBETnt bRiA== X-Gm-Message-State: ALQs6tCm+39ovruKmFXBI4SNP8chanEPZyY4id/UlWHOHEtNBwFk6mnv Sy3Bq94WxBBvcg1IzY5uJZY= 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 Cc: Wei Yang , Kees Cook , Laura Abbott , Vladimir Murzin , Philip Derrin , AKASHI Takahiro , James Morse , Steve Capper , Pavel Tatashin , Gioh Kim , Vlastimil Babka , Mel Gorman , Johannes Weiner , Kemi Wang , Petr Tesarik , YASUAKI ISHIMATSU , Andrey Ryabinin , Nikolay Borisov , Daniel Jordan , Daniel Vacek , Eugeniu Rosca , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Jia He , Jia He 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> 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 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 -- 2.7.4