From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AFEC81E7C2F; Tue, 11 Mar 2025 05:57:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741672666; cv=none; b=kdC0VLOm6T49XH4TMxoYAZchwl4zN0HmEjOP7RIQpp6pYsPfwxrHL/Jg9bAuQnIJ8yMXHE1WMOQMJ9kAtjdbbbdQqCjbROSB77m3Vy0FQIha5amzSf1XI2JnuKFbTGuGk1JnmQ6aCXO4VzL5CjE4L+WiXZCb5VtvNustkejzcBA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741672666; c=relaxed/simple; bh=BYwU/E93/QHnTs75zXL/K5KaaL59dt5dqcEKsspSbzo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=t6dpsoZ0VxKAuWORjIO9mpfXc0gdRGAi9S5JNsG2g3jXhohwF4Yp/vrR7td22L8hutpf9LHTrZtfYLGSlJleL96yUhPuljyeLLe+21NbjtX2F4mZDN88MIfNhfHUygaU3mdaWrvYoGLiSJzqpOtq18t4E2gbHcxIWhViUxQeAbc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dmTErZmr; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="dmTErZmr" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B78FCC4CEE9; Tue, 11 Mar 2025 05:57:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1741672666; bh=BYwU/E93/QHnTs75zXL/K5KaaL59dt5dqcEKsspSbzo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dmTErZmrStaJuWPq1Y2KiGUlkJyWnCTthhB4B91JAVbdcH9I2nMKyf/7Fd4sug/pB N7nEu2kNBk1O0Ul+w/IBo19oXH5glyY2bbtD6tCtn0BJHbkHTd1iWoNnx2w3T9m+7H IxxQVA4Y4Lv0jGi6PXT0q9QqF5s7ZqRI2g89QBdwAFMPmOQwhOa9TxU3xtlxsqpRqF lYy7nKRBTlEc1vamVRBquPAmfL9PiTgEWIBb6xcf97y28M06V5hY0PpqPM3HaTZw4K HfU+XsvU0VemNSiwuoybyIXmF+A+kWMDABoLN29HvFjqUrPbxMBmNFc1zs7FVelcPG fJ1v7DiVKuKeg== Date: Tue, 11 Mar 2025 07:57:23 +0200 From: Mike Rapoport To: Andrew Morton Cc: Alexander Gordeev , Andreas Larsson , Andy Lutomirski , Arnd Bergmann , Borislav Petkov , Brian Cain , Catalin Marinas , Dave Hansen , "David S. Miller" , Dinh Nguyen , Geert Uytterhoeven , Gerald Schaefer , Guo Ren , Heiko Carstens , Helge Deller , Huacai Chen , Ingo Molnar , Jiaxun Yang , Johannes Berg , John Paul Adrian Glaubitz , Madhavan Srinivasan , Matt Turner , Max Filippov , Michael Ellerman , Michal Simek , Palmer Dabbelt , Peter Zijlstra , Richard Weinberger , Russell King , Stafford Horne , Thomas Bogendoerfer , Thomas Gleixner , Vasily Gorbik , Vineet Gupta , Will Deacon , linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-hexagon@vger.kernel.org, loongarch@lists.linux.dev, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-openrisc@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-um@lists.infradead.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, x86@kernel.org Subject: Re: [PATCH 05/13] MIPS: make setup_zero_pages() use memblock Message-ID: References: <20250306185124.3147510-1-rppt@kernel.org> <20250306185124.3147510-6-rppt@kernel.org> Precedence: bulk X-Mailing-List: sparclinux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250306185124.3147510-6-rppt@kernel.org> On Thu, Mar 06, 2025 at 08:51:15PM +0200, Mike Rapoport wrote: > From: "Mike Rapoport (Microsoft)" > > Allocating the zero pages from memblock is simpler because the memory is > already reserved. > > This will also help with pulling out memblock_free_all() to the generic > code and reducing code duplication in arch::mem_init(). > > Signed-off-by: Mike Rapoport (Microsoft) > --- > arch/mips/include/asm/mmzone.h | 2 -- > arch/mips/mm/init.c | 16 +++++----------- > 2 files changed, 5 insertions(+), 13 deletions(-) Andrew can you please pick this as a fixup? >From 148713d17cbdf7a3ad08f18ba203185b70c0e7c2 Mon Sep 17 00:00:00 2001 From: "Mike Rapoport (Microsoft)" Date: Tue, 11 Mar 2025 07:51:27 +0200 Subject: [PATCH] MIPS: use memblock_alloc_or_panic() in setup_zero_page() Signed-off-by: Mike Rapoport (Microsoft) --- arch/mips/mm/init.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c index 6ea27bbd387e..a673d3d68254 100644 --- a/arch/mips/mm/init.c +++ b/arch/mips/mm/init.c @@ -68,9 +68,7 @@ static void __init setup_zero_pages(void) else order = 0; - empty_zero_page = (unsigned long)memblock_alloc(PAGE_SIZE << order, PAGE_SIZE); - if (!empty_zero_page) - panic("Oh boy, that early out of memory?"); + empty_zero_page = (unsigned long)memblock_alloc_or_panic(PAGE_SIZE << order, PAGE_SIZE); zero_page_mask = ((PAGE_SIZE << order) - 1) & PAGE_MASK; } -- 2.47.2 -- Sincerely yours, Mike.