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 94D32EB597B for ; Thu, 12 Feb 2026 08:39:37 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4fBTHq5kGxz2yFm; Thu, 12 Feb 2026 19:39:35 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=94.231.106.210 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1770885575; cv=none; b=ZOG8NPG9eRc78MgcTmwU/EGHlQOdMH8a31JKtM68JqwzjajXucgXk9eRCQA1HaB9/ukAvSnwwn/g20gvKPVFi48inoJXCs8S/M3Jj1RQ6zKNVGtjdMrcguKbIovciT1d6yWZ0PxPHNE1YlL45sJZYajhMDS0MVr0qf8x3XAOAvC1ffk/wYcAnF/2xV3CoqdMSR7zpN2pyxaNqZ1B0YBw8c3SepIGdE1scWXsZWkltOrZgSuzLhA3gg0hDSvIMUE5XlGZX8Vix/K4j+pNSdXM5cCeRByYCjU5BKRo51KpQnb0TLPwlIZZszmcZsEbRoK1wO/r3IGTTy+MGazGkSGXYQ== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1770885575; c=relaxed/relaxed; bh=PGI9E0Ah/sCKqUWdGGZrUCOyQzLXgtvn+/30CBuRp9w=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=U5/a+BRmS6af0hUPYH7uJlaYzuA5lu/I2PhaOZJdhQRNYvpGjLUdjKFmhkLX8rb1PRdCDyhFxuI2d4XLC/ijo9oA/oP5jMY5aV/voenfYlaMrnHI2DAaI/ZbTVpHU7ITiRaLKA8ZC5Z6PMl6ErKbcDCDzyf0d/+li2x7MMd+r7HY4GCXkuGdRDYBWMJIhwsnaLAvwb9gqRVPK1vlBydCQqY/Y9qF0PDMJ7mZH+4pheV/fboA+ah1PYeOHOsaObC2oEHZT0AVM1WzzcNfcPndxBLsMaKVj6Y7YEQtGv6Y93smCl07CpLn+hzk06o9uRdSQhNF+bMogPLXct29ltJjSw== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gaisler.com; dkim=fail header.d=gaisler.com header.i=@gaisler.com header.a=rsa-sha256 header.s=simplycom2 header.b=Kom0jmG4 reason="key not found in DNS"; dkim-atps=neutral; spf=pass (client-ip=94.231.106.210; helo=smtp-out3.simply.com; envelope-from=andreas@gaisler.com; receiver=lists.ozlabs.org) smtp.mailfrom=gaisler.com Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gaisler.com Authentication-Results: lists.ozlabs.org; dkim=fail reason="key not found in DNS" header.d=gaisler.com header.i=@gaisler.com header.a=rsa-sha256 header.s=simplycom2 header.b=Kom0jmG4; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gaisler.com (client-ip=94.231.106.210; helo=smtp-out3.simply.com; envelope-from=andreas@gaisler.com; receiver=lists.ozlabs.org) Received: from smtp-out3.simply.com (smtp-out3.simply.com [94.231.106.210]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4fBTHn0Bgjz2xlh for ; Thu, 12 Feb 2026 19:39:31 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp.simply.com (Simply.com) with ESMTP id 4fBTHd67LVz1DDhH; Thu, 12 Feb 2026 09:39:25 +0100 (CET) Received: from [192.168.0.25] (h-98-128-223-123.NA.cust.bahnhof.se [98.128.223.123]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) by smtp.simply.com (Simply.com) with ESMTPSA id 4fBTHb5J7Hz1DDZ7; Thu, 12 Feb 2026 09:39:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gaisler.com; s=simplycom2; t=1770885565; bh=PGI9E0Ah/sCKqUWdGGZrUCOyQzLXgtvn+/30CBuRp9w=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=Kom0jmG4cp2aCCPXYGhzvsNdpnID6H+n8FBHwTifdpEYGIUBXrnEh77Zjb+F4Uw9H UXUPUIguRj6rXxio7bPxKL8EDMaAwhGefR3rfI1wHeSXx/zPR33P8qJNbunSZ43qDr NgFlGeDjza2ZQm8OzzMjsW6vlhjo+CZxjlwQT+qLbYqhmgxd8Q8Ihyd2HOc3dvoADp o+xiWOcZDwMxqEP+I8vJDl4qWqdv4qG5u0jzztECJfg3xosxH+CpUDCdgJZ6vEOukO glY3kmdJgj3w/lSoryU0vkLnI0wkwv88sda11lAy2tHIoR1eKoCLmGUm0esizzLPxM ivEADa7FfTprA== Message-ID: Date: Thu, 12 Feb 2026 09:38:42 +0100 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 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 3/4] arch, mm: consolidate empty_zero_page To: Mike Rapoport , Andrew Morton Cc: Borislav Petkov , Brian Cain , Catalin Marinas , "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 References: <20260211103141.3215197-1-rppt@kernel.org> <20260211103141.3215197-4-rppt@kernel.org> Content-Language: en-US From: Andreas Larsson In-Reply-To: <20260211103141.3215197-4-rppt@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 2026-02-11 11:31, 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) > Acked-by: Dave Hansen > Acked-by: Catalin Marinas > Signed-off-by: Mike Rapoport (Microsoft) > --- > arch/sparc/include/asm/pgtable_32.h | 8 -------- > arch/sparc/include/asm/setup.h | 2 -- > arch/sparc/kernel/head_32.S | 7 ------- > arch/sparc/mm/init_32.c | 4 ---- > arch/sparc/mm/init_64.c | 11 ++++------- Acked-by: Andreas Larsson #sparc Cheers, Andreas