From mboxrd@z Thu Jan 1 00:00:00 1970 From: Catalin Marinas Subject: Re: [PATCH v2 09/13] arm, arm64: move free_unused_memmap() to generic mm Date: Sat, 14 Nov 2020 12:15:17 +0000 Message-ID: <20201114121516.GA2837@gaia> References: <20201101170454.9567-1-rppt@kernel.org> <20201101170454.9567-10-rppt@kernel.org> Mime-Version: 1.0 Return-path: Content-Disposition: inline In-Reply-To: <20201101170454.9567-10-rppt@kernel.org> List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Mike Rapoport Cc: Andrew Morton , Alexey Dobriyan , Geert Uytterhoeven , Greg Ungerer , John Paul Adrian Glaubitz , Jonathan Corbet , Matt Turner , Meelis Roos , Michael Schmitz , Mike Rapoport , Russell King , Tony Luck , Vineet Gupta , Will Deacon , linux-alpha@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mm@kvack.org, l On Sun, Nov 01, 2020 at 07:04:50PM +0200, Mike Rapoport wrote: > From: Mike Rapoport > > ARM and ARM64 free unused parts of the memory map just before the > initialization of the page allocator. To allow holes in the memory map both > architectures overload pfn_valid() and define HAVE_ARCH_PFN_VALID. > > Allowing holes in the memory map for FLATMEM may be useful for small > machines, such as ARC and m68k and will enable those architectures to cease > using DISCONTIGMEM and still support more than one memory bank. > > Move the functions that free unused memory map to generic mm and enable > them in case HAVE_ARCH_PFN_VALID=y. > > Signed-off-by: Mike Rapoport For arm64: Acked-by: Catalin Marinas