From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751447AbeDEM3z (ORCPT ); Thu, 5 Apr 2018 08:29:55 -0400 Received: from mail-pl0-f66.google.com ([209.85.160.66]:36041 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750997AbeDEM3x (ORCPT ); Thu, 5 Apr 2018 08:29:53 -0400 X-Google-Smtp-Source: AIpwx4+xjjU7nlyeC1nSuMJeMddF7H8/93wBaovqnqKgDRoklMbuoFdXA/3V63ZrgAYQkuJn2UMVgA== Subject: Re: [PATCH v7 1/5] mm: page_alloc: remain memblock_next_valid_pfn() on arm and arm64 To: Matthew Wilcox Cc: Russell King , Catalin Marinas , Will Deacon , Mark Rutland , Ard Biesheuvel , Andrew Morton , Michal Hocko , 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 References: <1522915478-5044-1-git-send-email-hejianet@gmail.com> <1522915478-5044-2-git-send-email-hejianet@gmail.com> <20180405112357.GA2647@bombadil.infradead.org> From: Jia He Message-ID: Date: Thu, 5 Apr 2018 20:29:30 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180405112357.GA2647@bombadil.infradead.org> Content-Type: text/plain; charset=gbk; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks, Matthew On 4/5/2018 7:23 PM, Matthew Wilcox Wrote: > On Thu, Apr 05, 2018 at 01:04:34AM -0700, Jia He wrote: >> create mode 100644 include/linux/arm96_common.h > 'arm96_common'?! No. Just no. > > The right way to share common code is to create a header file (or use > an existing one), either in asm-generic or linux, with a #ifdef CONFIG_foo > block and then 'select foo' in the arm Kconfig files. That allows this > common code to be shared, maybe with powerpc or x86 or ... in the future. > ok How about include/asm-generic/early_pfn.h ? And could I use CONFIG_HAVE_ARCH_PFN_VALID and CONFIG_HAVE_MEMBLOCKin this case? Currently, arm/arm64 have memblock enable by default. When other arches implement their HAVE_MEMBLOCK and HAVE_ARCH_PFN_VALID, they can include this file? -- Cheers, Jia