Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp860436imm; Fri, 17 Aug 2018 07:52:57 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyUQ/Z2oiUyO/TdCt26X4ZdTtRZ6CfyKSKWVU7C0yUHZiw/UlBIH4ejMPzB57W+82L+EZzU X-Received: by 2002:a17:902:a5:: with SMTP id a34-v6mr34184479pla.60.1534517577509; Fri, 17 Aug 2018 07:52:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534517577; cv=none; d=google.com; s=arc-20160816; b=vOsGzcOsq0QyfbaEeHg2jnvK5gi7W4iR0g5bnYx5dOFn2ei5fg9GdvkRV6ewWyqEQc vkX827wOpn9ioG4LEwShwsbV+u/ct5WUTc4L8ZqW4utrbrXNrjBIxkBssCAhTtlJesvJ IWKMsBaxUehNT2MXSOHgEa48jCTnk/Znhdlsw8cLJgaX04Qr0nVMOv3p5QRwIrdOqx4a hk5oEZFkyRURYH+FClvtUwaLSH93iZmdXz0fPLg0K4RBDWUtOCGqMivCAZZeQz5q8NhR OnAJlYZIC5ry449fesdzKFghFMwWr0VfVkvg7W7Qwl3jtvrkQ2W+iTzK8ohxTbelVHza cnYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=E47JykLfm+q0RuwYf33laJirCxyLqYPOAWHaQbVL0Xw=; b=Kfvb2ZQUWeNSAqODxCf5tpeennA9GbzXGNge1bRiNB6/EBs2JHzpMXNCY14i5WVnQs lIOJ2zd1eJf5Wb2QDr0f3VQGKSxgdz6/sFBieBuoT14qrwmhaHkVsUmlgSHZ+Xe+TZ/S 2auFina8XTa/wGdO71GA4LA+RMDsahsMLgBL6UePxAuXJpY1BvMzj2m6arTA2uRGE0Fk JYJneBrPyd4t04di9Drud0SjDejhsugdMH0OT8COhTm6+fM/SWthe9taXqW91miwfKwM dS1hk4fwGCtOFSC/GXqxb5y8E52+yYFRzmc/dEeK49P7weRAl2nxDWwD91zrLZdt32G8 aw/A== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cf10-v6si2475732plb.9.2018.08.17.07.52.42; Fri, 17 Aug 2018 07:52:57 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727547AbeHQRyk (ORCPT + 99 others); Fri, 17 Aug 2018 13:54:40 -0400 Received: from foss.arm.com ([217.140.101.70]:48170 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727365AbeHQRyk (ORCPT ); Fri, 17 Aug 2018 13:54:40 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A3C3480D; Fri, 17 Aug 2018 07:51:00 -0700 (PDT) Received: from armageddon.cambridge.arm.com (armageddon.emea.arm.com [10.4.13.16]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id AAD7D3F5B3; Fri, 17 Aug 2018 07:50:55 -0700 (PDT) Date: Fri, 17 Aug 2018 15:50:53 +0100 From: Catalin Marinas To: Jia He Cc: Russell King , Will Deacon , Mark Rutland , Ard Biesheuvel , Andrew Morton , Michal Hocko , Gioh Kim , Wei Yang , linux-mm@kvack.org, Eugeniu Rosca , Petr Tesarik , Nikolay Borisov , 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 Subject: Re: [RESEND PATCH v10 1/6] arm: arm64: introduce CONFIG_HAVE_MEMBLOCK_PFN_VALID Message-ID: <20180817145052.aizhi6n66vxblriq@armageddon.cambridge.arm.com> References: <1530867675-9018-1-git-send-email-hejianet@gmail.com> <1530867675-9018-2-git-send-email-hejianet@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1530867675-9018-2-git-send-email-hejianet@gmail.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 06, 2018 at 05:01:10PM +0800, Jia He wrote: > 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 Since you defined HAVE_MEMBLOCK_PFN_VALID here, do we need to define it in the arch code as well? If kept it in the mm/Kconfig only, you could just select it in the arch HAVE_ARCH_PFN_VALID entry: diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index d0a53cc6293a..cd230c77e122 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -787,6 +787,7 @@ config ARCH_FLATMEM_ENABLE config HAVE_ARCH_PFN_VALID def_bool ARCH_HAS_HOLES_MEMORYMODEL || !SPARSEMEM + select HAVE_MEMBLOCK_PFN_VALID config HW_PERF_EVENTS def_bool y (similarly for arch/arm) -- Catalin