Received: by 10.213.65.68 with SMTP id h4csp1881837imn; Thu, 5 Apr 2018 05:31:26 -0700 (PDT) X-Google-Smtp-Source: AIpwx49b5zMbwxJdBie5MHj/NbsZeLf6hES0NjzVsZXIHhFaymbjtu7S/bu6FoylDZkWJBiQb8d2 X-Received: by 2002:a17:902:8:: with SMTP id 8-v6mr22381010pla.291.1522931485900; Thu, 05 Apr 2018 05:31:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522931485; cv=none; d=google.com; s=arc-20160816; b=KWFHRVBbxzI/URrnajgYc1UAGSHcx6gUuKYWoLnj2HY5ZeZQTmhIi0PtAbMz5su6Uw KKwCoaDt5QaRY1Uve+5Y6qORKdBK95p+FuGn9ZZJKllDoUp+OLji9ntv3JXb+zdMaAhl P48NK2D4h6Uliyl3A6wW4rbRwGu66pgnrOUqm/+nIt3+KInEWjJ3xz5w/LPk/i2a19WI fZ8WUCR6btJYx9g4HkmKdtxgqdIR8kBeaB/bklYni3mB5VyYu0TAcSgnOLQm19pWGzfL 9dcT/b1aeC0ihO2McsxjHuCldDj2qtmvprCGxdmfOSH06i+gFochU2YJRL3ze6CGN5d2 ha+w== 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=FX6+dN+36iwspuvxM7AHMJbAsucH4bAXjN0kKXgRxr0=; b=Jvm3RJgCVvPe94PLlhH/qOWhR1Ovx/RzEJabVRRg+yCBDSPALfI2YW+/4Pjqh3tk2T JMx0eu7KcxGp572eauU0FfpjZd/Qf2WoRZ3lg9dxA93IUqXVscBGkmqnFAwCot+y6rLV JMESDCVcnk3/nF5TfnCKOc0gIFX9VEDMXnB2JJ0qENgkWYfAqcT5TW0XPfqO0n0xYxtn 3sRWcc9l1pv275F+IfgfqNS9wTuqUZnsw7+iPCz9lcXGHbFTqlhANB8JlFjSpsk/A79L sJukVPGLT4zDtgDnLNluJ38A8HNX8awEv5GAWEitMVJ3EJzRrMHoMigoV8Vvky/eitr+ q9yA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=g3dR+DDA; 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 k8-v6si5975011pls.368.2018.04.05.05.31.11; Thu, 05 Apr 2018 05:31:25 -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=g3dR+DDA; 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 S1751443AbeDEM3z (ORCPT + 99 others); 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 Received: by mail-pl0-f66.google.com with SMTP id 91-v6so18853919pld.3 for ; Thu, 05 Apr 2018 05:29:53 -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=FX6+dN+36iwspuvxM7AHMJbAsucH4bAXjN0kKXgRxr0=; b=g3dR+DDACkaEhjy+3uMDuyyZJ6ytqZESfkox0IRfJt1IACBZ9j474yJ090a/ZdYFeK v/Dg7g0hU7JbDgbJdi+65bPz6VgHj8KItzougHj99Yt7MikVcAag+EWhod3vu6rNkwaD UZEAG3n+G+6jmTasBTb1Yd8iXiT0l/plCn//NfiyATmwihm2tL1ijRDPngRpNVAl3JyY gFkXwPn9D33C3Q/UgcY8wUOEGxZ/R6mSqBZ+JOIpSsbAt4ZP9B3ATBqScEUd9JnjHfPG jayiSy1KOtibdwOn9Djt1eZ2A2v2q4WjynZYFEzVi1aZ28RUb1B79/0id4bP99+NO09B pELQ== 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=FX6+dN+36iwspuvxM7AHMJbAsucH4bAXjN0kKXgRxr0=; b=enbjlxTOwnzFTArds54VXZBsfwzMMD3pChrFoKStE9WTJCJZcUjwlehX7okDhhgc0N Wz/upBJTOx42mheqVjfa177bYKV5CHGnfzIIvbGQcVdL98bJH6MA4gO2RHTp3YfSWWvr Sk9NEs1iNHQkA44gIs8C4UyiRXAqbG7jux6SFddt7gsOAQlmOpEJHef3SKkS7sALToql tuFMlyE3UaGLxoDHhnALGBl8HeJYMvq4DPzIdJDV/+lwdNIYF9ffMKBE29satp2DSFXg 3akAaXj5bYc87C7k5XiWFcLUVkFyUbS5Sy7fKF0hZWzTW0DmzJ/zv42nLW27aBHT6zYp vUzg== X-Gm-Message-State: AElRT7GRMjsCDSbhcdGxGsvZS/+hf06Mq9vCtmKzlYl163CV7g5W/+Oz jf4ROAENPBQokFQbSndAL1I= X-Received: by 2002:a17:902:1e3:: with SMTP id b90-v6mr22708197plb.155.1522931393172; Thu, 05 Apr 2018 05:29:53 -0700 (PDT) Received: from [0.0.0.0] (67.216.217.169.16clouds.com. [67.216.217.169]) by smtp.gmail.com with ESMTPSA id s63sm16684602pfe.6.2018.04.05.05.29.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Apr 2018 05:29:52 -0700 (PDT) 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 Precedence: bulk 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