mirror-linux/arch/mips
Mike Rapoport (Microsoft) 26513781d1 mm: cache struct page for empty_zero_page and return it from ZERO_PAGE()
For most architectures every invocation of ZERO_PAGE() does
virt_to_page(empty_zero_page).  But empty_zero_page is in BSS and it is
enough to get its struct page once at initialization time and then use it
whenever a zero page should be accessed.

Add yet another __zero_page variable that will be initialized as
virt_to_page(empty_zero_page) for most architectures in a weak
arch_setup_zero_pages() function.

For architectures that use colored zero pages (MIPS and s390) rename their
setup_zero_pages() to arch_setup_zero_pages() and make it global rather
than static.

For architectures that cannot use virt_to_page() for BSS (arm64 and
sparc64) add override of arch_setup_zero_pages().

Link: https://lkml.kernel.org/r/20260211103141.3215197-5-rppt@kernel.org
Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: David Hildenbrand (Arm) <david@kernel.org>
Acked-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Cc: Andreas Larsson <andreas@gaisler.com>
Cc: "Borislav Petkov (AMD)" <bp@alien8.de>
Cc: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Dinh Nguyen <dinguyen@kernel.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Guo Ren <guoren@kernel.org>
Cc: Helge Deller <deller@gmx.de>
Cc: Huacai Chen <chenhuacai@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Magnus Lindholm <linmag7@gmail.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Stafford Horne <shorne@gmail.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vineet Gupta <vgupta@kernel.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2026-04-05 13:53:01 -07:00
..
alchemy Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ath25 MIPS: Switch to irq_domain_create_*() 2025-05-16 21:06:10 +02:00
ath79
bcm47xx Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
bcm63xx treewide: rename GPIO set callbacks back to their original names 2025-08-07 10:07:06 +02:00
bmips
boot cleanups and fixes 2026-02-16 09:30:44 -08:00
cavium-octeon Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
cobalt
configs net: ethernet: neterion: s2io: remove unused driver 2026-01-28 20:08:07 -08:00
crypto lib/crypto: mips/md5: Migrate optimized code into library 2025-08-26 12:52:28 -04:00
dec MIPS: dec: Declare which_prom() as static 2025-02-27 10:40:45 +01:00
econet mips: dts: Add EcoNet DTS with EN751221 and SmartFiber XP8421-B board 2025-05-20 08:47:07 +02:00
fw MIPS: arc: Replace deprecated strcpy() with memcpy() 2025-08-29 22:34:30 +02:00
generic MIPS: generic: Replace deprecated strcpy() in ocelot_detect() 2025-08-29 22:34:30 +02:00
include cleanups and fixes 2026-02-16 09:30:44 -08:00
ingenic
jazz MIPS/jazzdma: Provide physical address directly 2025-10-29 10:27:30 +01:00
kernel kbuild: Split .modinfo out from ELF_DETAILS 2026-02-26 11:50:19 -07:00
kvm KVM generic changes for 7.0 2026-03-11 18:01:55 +01:00
lantiq Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
lib Crypto library updates for 6.17 2025-07-28 17:58:52 -07:00
loongson2ef MIPS: Loongson2ef: Use pcibios_align_resource() to block io range 2026-02-05 10:00:37 +01:00
loongson32 MIPS: loongson32: Switch to generic core 2025-08-29 22:34:31 +02:00
loongson64 treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
math-emu mips: math-emu: replace deprecated strcpy() in me-debugfs 2025-09-12 11:56:06 +02:00
mm mm: cache struct page for empty_zero_page and return it from ZERO_PAGE() 2026-04-05 13:53:01 -07:00
mobileye
mti-malta MIPS: Malta: Fix !EVA SOC-it PCI MMIO 2025-11-11 12:58:49 +01:00
n64
net
pci Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
pic32 MIPS: update include to use pic32.h from platform_data 2026-01-30 15:29:07 +01:00
power
ralink Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
rb532 cleanups and fixes 2026-02-16 09:30:44 -08:00
sgi-ip22 Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
sgi-ip27 Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
sgi-ip30 Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
sgi-ip32 MIPS: sgi-ip32: Replace deprecated strcpy() in plat_mem_setup() 2025-08-29 22:34:30 +02:00
sibyte
sni MIPS: sni: Replace deprecated strcpy() in sni_console_setup() 2025-08-29 22:34:30 +02:00
tools
txx9 Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
vdso MIPS: vdso: Provide getres_time64() for 32-bit ABIs 2026-01-13 14:42:23 +01:00
Kbuild
Kbuild.platforms mips: Add EcoNet MIPS platform support 2025-05-20 08:46:58 +02:00
Kconfig cleanups and fixes 2026-02-16 09:30:44 -08:00
Kconfig.debug
Makefile kbuild: Introduce Kconfig symbol for linking vmlinux with relocations 2025-03-17 00:29:50 +09:00
Makefile.postlink kbuild: Create intermediate vmlinux build with relocations preserved 2025-03-17 00:29:50 +09:00