Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3524698imm; Sun, 19 Aug 2018 23:29:19 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwICR3s4lLg15uI1KG0lM1WQuvHxKflLqMQf5+MLtD4sh004bKu8PJo9DCmsurp7lDe4vCz X-Received: by 2002:a63:a011:: with SMTP id r17-v6mr40549287pge.90.1534746559406; Sun, 19 Aug 2018 23:29:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534746559; cv=none; d=google.com; s=arc-20160816; b=EXojbSw5tIVWbqgleytTMJFaBwvYcExiGyidknUiXL1t6Ow+c/wpWddOfpCi6YtCHz z9aZ/Pin+1Xhwl6TcWMQXWPMhOpDCyA9gsLawZf0IAHorxQ3kZurN/gpnc0bnCZVizfC WLlDZMADNAs2b61ObFUpvqpXuQE5Qmu+FhBaL1wnpU8/dputSc9xRlPDB5Jiam97GOGU VPbxPK9u/E0URataGX60k5jreg+ysqmbkkox+gX8B5DoqeFTsZHTixmSchQ7bIX4NinL Apod0mQ+XFcvVBzTBlqo2q6ix/MJ+KrdkZM4WWjv00mI46E8ZSGMB3NZ9UJhbGUDn1xp 7KYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject:dkim-signature:arc-authentication-results; bh=Yz7wEo21KDl6XZd/7JFQg+qH9llCO8Z+FykYVokknew=; b=ZD3rWpJ3XNW2IhkG5lmBYVIXC034amlI3xwM16+6EASwebcy/EkJ9rUFlXg4iGswtx yXuYAvgMagZiF6FOhHG2Ql76BBD7x08XeFD4AVOjwp4rKNQEcuj2e2amK8Jz02WT6WxI F0pWu+laHM940W9qnEQBWRVxaar6pV+5yxahr1ZEpWBh2Pdph5hiJOHw7rnTndOypysK D4ghaJsXOJwmt/cRFdi7DDcw8cujVPLmM7C3CjiWVeq3MhP14FUrRVn4PJeLA8bg+X+B Do/xdZGArts6c1dwNlgBxRM5b7TxyU2+cjZBqAPGvlNH6N7Z/1CE1NF2ulbi8GZXBp4V BEMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=aCTZ70Do; 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 w188-v6si9225609pfw.307.2018.08.19.23.29.04; Sun, 19 Aug 2018 23:29:19 -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=aCTZ70Do; 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 S1726198AbeHTJlz (ORCPT + 99 others); Mon, 20 Aug 2018 05:41:55 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:46105 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726026AbeHTJlz (ORCPT ); Mon, 20 Aug 2018 05:41:55 -0400 Received: by mail-pf1-f196.google.com with SMTP id u24-v6so6222778pfn.13 for ; Sun, 19 Aug 2018 23:27:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=Yz7wEo21KDl6XZd/7JFQg+qH9llCO8Z+FykYVokknew=; b=aCTZ70DolZsekwa4Cxhiyldi/pFVyL45ZPqx5WCM85qNmTCVxe1uZwl4Fte7ZnvWEu 81l/JbqPibuv09mKroyb0+tcWruOEtOI1w+ONMByYzhpGMPQQeUKT7+PNz9i9CvCObl2 nJIC2SrEenYNYBQXwpJuK2V5GOqxUqBIya6cpU6uN8IyOkVNVjiXN2/OSwDt+7algB9a A9IEWZ8Gm2UVZNO8//jk/rRgZ9WXaWkrgcRexQrQsK/gxh3kT/qiA4e8CoNxhMY7UbfE XCyw78TLl+sxe4pTh6fdvzQrNI6lXQf4vIwl/MpKR0DEMQjfLtinFuQGiT76u83LbHSk 4X/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=Yz7wEo21KDl6XZd/7JFQg+qH9llCO8Z+FykYVokknew=; b=PRh5OsyY2KQwMpaHlyVLdBa6npbCGSvgYU72Wqs3L5W3wTIz9fr4KzAj3QljJwkaHj pINgFMibEMQ19d6wrbrSzTTGxQWvca0rSU+UrYRMXNRyznExC8+CpGnaKn/h0Zugisb9 rRFkRxL+W7xMn/001jD8pFIiZI73d0ihNezX5xwno04R309lWQhK4wVLVoE1oppIJhw5 W4AN6BAhy9UJk7J/+te8fEBatyfk6EFgtFsfTk1CeCPHUEwuqut+D0MgiGxb8s8uT8SR mWQWfPmwACe6aK1+qyiKr+YNeWuvzb1Yv+fDzREWj+ZLGnEwAcVYVKPP03N6M87BlLHm JfOQ== X-Gm-Message-State: AOUpUlEwSqOPMLpqCJcT1jxF3EEm4VRc2zpYLhQyr8tckMojcWwSNLBL 6tVgv9GE/oWQm06ERahHXuo= X-Received: by 2002:a63:4104:: with SMTP id o4-v6mr9980634pga.146.1534746453827; Sun, 19 Aug 2018 23:27:33 -0700 (PDT) Received: from [0.0.0.0] (96.45.178.72.16clouds.com. [96.45.178.72]) by smtp.gmail.com with ESMTPSA id o10-v6sm20917343pfk.76.2018.08.19.23.27.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 Aug 2018 23:27:32 -0700 (PDT) Subject: Re: [RESEND PATCH v10 1/6] arm: arm64: introduce CONFIG_HAVE_MEMBLOCK_PFN_VALID To: Catalin Marinas 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 References: <1530867675-9018-1-git-send-email-hejianet@gmail.com> <1530867675-9018-2-git-send-email-hejianet@gmail.com> <20180817145052.aizhi6n66vxblriq@armageddon.cambridge.arm.com> From: Jia He Message-ID: <73e1f356-2b6c-a7fd-2f04-e5b58ae79884@gmail.com> Date: Mon, 20 Aug 2018 14:27:22 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180817145052.aizhi6n66vxblriq@armageddon.cambridge.arm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/17/2018 10:50 PM, Catalin Marinas Wrote: > 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: > Ok, thanks for the comments It makes it more clean. -- Cheers, Jia > 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) >