From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5DAC2EA8124 for ; Tue, 10 Feb 2026 15:00:58 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4f9Prn04Vfz2xN5; Wed, 11 Feb 2026 02:00:57 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1770735656; cv=none; b=U87m7hsRYtFeOmfMRsw5UqugSSCTmeKjOP/Jo4Ifb6QrUySK8scJyz9bzOjINR2q2QH07dlpIF8K0WYpIfJ5kcxNZyW/7oqHuzve0RxEj4PZEGJK1o7k2PB/ZOFNQ14KIGFikd/yuMtIyZtlOJ7noqu9BsVerrouI1YSuXlP6xWmZY4Me5czOBX4wsI84fe1j14eh0FP73Za0YvsrH1sxQE9BeUNwZhjItwwY1oLEj2DbmRU18mKkbJ9nq2wUwL0xzm3zEnn41V5tgsYAw/kr/VKe2nIA9a7UwqYFMGJ2lh+FmJX5IrGoNo1c2viubMcmY+Wmb4mxCvkeaiEWEOOQw== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1770735656; c=relaxed/relaxed; bh=7x+sepqJzaiGguFJGDA2SGdYnfQz0dZUriOf1q/rtrY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=bWomjOtJ0tEMCqeS8FruyEhPXJLLkHGo+YmaO1hnS2LaygojZS/DZb6jLnOw3ne0U1cryBiRSCwvNqUj3GVlM9fOklu/BdygMLWV+XBWsD1+eCaimFnmHU/B9gaRmQqqzyDxvd3CsYZqKLCANp1AiKObudPGW3y5Fx6PleOPygoWXVFTo/twoTArb0+QccSdMQbSdvmd8qqZAcuA1iR+L7KGnUezUxxrCicgIVlsHOYS8MyObU/buM+2xoXtpiOJVg98fXH03/auCUAAaH87d92UtOsHhMd+0CmlPZkhaT0o4HyG2dWbuBFqqkdq/apKnSuwB5L5VTBLAdTWPjL8Xg== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass (client-ip=217.140.110.172; helo=foss.arm.com; envelope-from=catalin.marinas@arm.com; receiver=lists.ozlabs.org) smtp.mailfrom=arm.com Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=arm.com (client-ip=217.140.110.172; helo=foss.arm.com; envelope-from=catalin.marinas@arm.com; receiver=lists.ozlabs.org) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lists.ozlabs.org (Postfix) with ESMTP id 4f9Prl55wHz2xKx for ; Wed, 11 Feb 2026 02:00:53 +1100 (AEDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C3B86339; Tue, 10 Feb 2026 07:00:14 -0800 (PST) Received: from arm.com (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E8D253F63F; Tue, 10 Feb 2026 07:00:13 -0800 (PST) Date: Tue, 10 Feb 2026 15:00:11 +0000 From: Catalin Marinas To: Mike Rapoport Cc: Andrew Morton , Andreas Larsson , Borislav Petkov , Brian Cain , "Christophe Leroy (CS GROUP)" , "David S. Miller" , Dave Hansen , David Hildenbrand , Dinh Nguyen , Geert Uytterhoeven , Guo Ren , Helge Deller , Huacai Chen , Ingo Molnar , Johannes Berg , John Paul Adrian Glaubitz , "Liam R. Howlett" , Lorenzo Stoakes , Madhavan Srinivasan , Magnus Lindholm , Matt Turner , Max Filippov , Michael Ellerman , Michal Hocko , Michal Simek , Palmer Dabbelt , Richard Weinberger , Russell King , Stafford Horne , Suren Baghdasaryan , Thomas Gleixner , Vineet Gupta , Vlastimil Babka , 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-openrisc@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-um@lists.infradead.org, linux-mm@kvack.org, x86@kernel.org Subject: Re: [PATCH v2 3/4] arch, mm: consolidate empty_zero_page Message-ID: References: <20260209144058.2092871-1-rppt@kernel.org> <20260209144058.2092871-4-rppt@kernel.org> X-Mailing-List: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260209144058.2092871-4-rppt@kernel.org> On Mon, Feb 09, 2026 at 04:40:56PM +0200, Mike Rapoport wrote: > From: "Mike Rapoport (Microsoft)" > > Reduce 22 declarations of empty_zero_page to 3 and 23 declarations of > ZERO_PAGE() to 4. > > Every architecture defines empty_zero_page that way or another, but for the > most of them it is always a page aligned page in BSS and most definitions > of ZERO_PAGE do virt_to_page(empty_zero_page). > > Move Linus vetted x86 definition of empty_zero_page and ZERO_PAGE() to the > core MM and drop these definitions in architectures that do not implement > colored zero page (MIPS and s390). > > ZERO_PAGE() remains a macro because turning it to a wrapper for a static > inline causes severe pain in header dependencies. > > For the most part the change is mechanical, with these being noteworthy: > > * alpha: aliased empty_zero_page with ZERO_PGE that was also used for boot > parameters. Switching to a generic empty_zero_page removes the aliasing > and keeps ZERO_PGE for boot parameters only > * arm64: uses __pa_symbol() in ZERO_PAGE() so that definition of > ZERO_PAGE() is kept intact. > * m68k/parisc/um: allocated empty_zero_page from memblock, > although they do not support zero page coloring and having it in BSS > will work fine. > * sparc64 can have empty_zero_page in BSS rather allocate it, but it > can't use virt_to_page() for BSS. Keep it's definition of ZERO_PAGE() > but instead of allocating it, make mem_map_zero point to > empty_zero_page. > * sh: used empty_zero_page for boot parameters at the very early boot. > Rename the parameters page to boot_params_page and let sh use the generic > empty_zero_page. > * hexagon: had an amusing comment about empty_zero_page > > /* A handy thing to have if one has the RAM. Declared in head.S */ > > that unfortunately had to go :) > > Acked-by: Helge Deller # parisc > Tested-by: Helge Deller # parisc > Reviewed-by: Christophe Leroy (CS GROUP) > Signed-off-by: Mike Rapoport (Microsoft) For arm64: Acked-by: Catalin Marinas