From patchwork Fri Jul 6 09:01:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jia He X-Patchwork-Id: 10511119 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 2ABA16024A for ; Fri, 6 Jul 2018 09:01:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 196DC1FFE6 for ; Fri, 6 Jul 2018 09:01:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0AB8C283BF; Fri, 6 Jul 2018 09:01:54 +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=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8BCA31FFE6 for ; Fri, 6 Jul 2018 09:01:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8E95C6B0007; Fri, 6 Jul 2018 05:01:52 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 8BF466B0008; Fri, 6 Jul 2018 05:01:52 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 787DA6B000A; Fri, 6 Jul 2018 05:01:52 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pf0-f199.google.com (mail-pf0-f199.google.com [209.85.192.199]) by kanga.kvack.org (Postfix) with ESMTP id 31DE16B0007 for ; Fri, 6 Jul 2018 05:01:52 -0400 (EDT) Received: by mail-pf0-f199.google.com with SMTP id t78-v6so6676705pfa.8 for ; Fri, 06 Jul 2018 02:01:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:from:to:cc:subject:date :message-id:in-reply-to:references; bh=KPtnS3pR0e6k1wruvZ/TmyKB2yqnQlAi9FUL26a/INc=; b=T6RbpwGpJY8O+qtvrCGlnoyGi27WN36njS69ZYAsIJ7xdcanIBNpFCyhbirZ+zo5Yv uVjkiiL6OiYqVzhZVAq70SJcWmuCokXlU7rE1GQAVoBvVfV1yJnoz008l/J2rLAL8cXT HWiYsBbqLphsdJaP95XUAmsoTpl+QeZI51NKOXI03cbZUFKYpOGxIdcpK5U6oAX57Usj VMONW79MH6eAa/ogrvpbtIkSxi++H1Qg94KQJwImz8wlhyCU4UG2IZJ3E2xuTDKede71 ZwPu4WcVlLY3bY4JEbpJClQnFvbGjJiL5Vx8F7Zvq+qTx/t6SXU+09eMycwje2B2dB2w TKTg== X-Gm-Message-State: APt69E0JyxlMUkTRtglkr4Pxa8eWuumD5VZabruMG6uQv6xzDYVUzwlc 2kAODO/mmFO9VQY9MKqkaS5r2m9iVNOd1k7wHTGBFg1xjK7Adf7gZresmnj2Wdep5zUriCp0fSN m90TejqsM8H9Tl1DavwpZB752qGsfdxFIDlmWG+ao3oyBMJ8TTV9CYQYxlXrKCJLY+3VaImL10e Pn1eh8M5ALy2KDJ5IRYruK+DZYqVNYshYuIAgIaoRpmGz0J6UBNA+Sshw0NqghK7vKna6L6aYeJ MTU8a9RCu/rLbID+TS+J+wPG8m1h4ZK1GsQm/RN3cG6rABLB86l8Omh34IDc7iSTSxtYY+jtgxb LhXcD0MyjNOsnSS6aVlz8F0zFgdJiNil9W/eWeb5w7Bej/5uEMmajlc5pob0lfpDY/R2VSwFOP5 b X-Received: by 2002:a63:b02:: with SMTP id 2-v6mr3910979pgl.301.1530867711891; Fri, 06 Jul 2018 02:01:51 -0700 (PDT) X-Received: by 2002:a63:b02:: with SMTP id 2-v6mr3910941pgl.301.1530867711251; Fri, 06 Jul 2018 02:01:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530867711; cv=none; d=google.com; s=arc-20160816; b=tALANFg9pfoxo/vzAwdmvBo5cIvprUcSshu58PyOJt6TvMdBvcEm+3lWTmFyl984K2 FDjRcK3PX+mVBcOBQQ+hxFFaFt3G4BWNWck6vBE8w92ZveFbsXUJuYUu5+FPLdm4qeYg Nj4qSx7IzbkbmFXkfG9lYGpcuXFgnZpixpU0H75vJ1cEEIco6ZJI/W0uHM4TR5Mopo3x TIIOlW2kH7cIsbTXljBn06CmURa7VE3N/J5AR+5C4cFl3q8tZbRL2WeUHtg6RJaTVWgu 6GY5bWCOYDBNAkxdFSZrHh4AiGc1h2G4PBaGBOVZ7P0Oj+mc/6xPdX+OFQpz+qx3OFlQ vscA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=KPtnS3pR0e6k1wruvZ/TmyKB2yqnQlAi9FUL26a/INc=; b=zN57ZJPaWR6fFKyzJ9/v1MbxK3jw08fKbHv7SdlBSw1+JWJW1OATAwXWGgsL6/XCXe jL9DOF1fGqBwr4VoHBU0uHT0AfR6KLaabc1K4NMuOSWJeh+pEFkkb5JKQm4QIokZQ0SN 9GL8hpSzfyIeeGjpmZtJ+PxZZj/AlWi8fPS1WRP/kfLpqEOSCYSZ1jPGZqZbaSw+eapn e/398QaZCkrD8k97pVhTbEY/2NUOBBUofMI30nc05oQeOuOFJ+ldKThgeUthTcW2HbWl vCDxGgJ+2oKQArcal40M2xVe6wotirgyvLnjujaNcSDF9M4pHHfh57ROGTBvj49qelt5 KExg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LuRqVoZP; spf=pass (google.com: domain of hejianet@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=hejianet@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id o18-v6sor2267636pfe.80.2018.07.06.02.01.50 for (Google Transport Security); Fri, 06 Jul 2018 02:01:51 -0700 (PDT) Received-SPF: pass (google.com: domain of hejianet@gmail.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LuRqVoZP; spf=pass (google.com: domain of hejianet@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=hejianet@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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=LuRqVoZPEbRWIfqYU1MU6QCSF8B6Zg5N9a3RwlgIKRCOR+KVsOSSj3viQldv3hmGMf GMSkCkr+MrV5JCQcfIvsgI4DDC9ML5GkQb19ltWaOTB4AzfmKCzgjKRkNygsZH9jSriT liB+Wn1NRDc8xIbC14v03tg9J5Wgg0toGMNXaAl6UhXKNfgVETWdYs5mehhfD1NBgb/C ep2YF3ukJWurieDqljq39BX87TJXZYD9L7euZ87hiDciWQxJLS/+gLNXtGKoerax6Hdj KNsPLQo9vY1gxp+7TAKiN2aC57Tw3gHCMDp/pxVyDJLrfdn1MeIRlzTFToh5C0NGJGZm YbmQ== X-Google-Smtp-Source: AAOMgpehkcfeqbchcOBmDvMMovxPJ2BktsOoy3RbIzObSZLAU+KvZD+8RQxXtQQp7oWfHac06YzHZw== X-Received: by 2002:a62:748:: with SMTP id b69-v6mr9805036pfd.177.1530867710772; Fri, 06 Jul 2018 02:01:50 -0700 (PDT) Received: from ct7host.localdomain ([38.106.11.25]) by smtp.gmail.com with ESMTPSA id e5-v6sm10837092pgs.59.2018.07.06.02.01.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Jul 2018 02:01:50 -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: [RESEND PATCH v10 1/6] arm: arm64: introduce CONFIG_HAVE_MEMBLOCK_PFN_VALID Date: Fri, 6 Jul 2018 17:01:10 +0800 Message-Id: <1530867675-9018-2-git-send-email-hejianet@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1530867675-9018-1-git-send-email-hejianet@gmail.com> References: <1530867675-9018-1-git-send-email-hejianet@gmail.com> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 | 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