linux/arch/parisc/include/asm
Mike Rapoport (Microsoft) 6215d9f447 arch, mm: consolidate empty_zero_page
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 :)

Link: https://lkml.kernel.org/r/20260211103141.3215197-4-rppt@kernel.org
Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Acked-by: Helge Deller <deller@gmx.de>		[parisc]
Tested-by: Helge Deller <deller@gmx.de>		[parisc]
Reviewed-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
Acked-by: Dave Hansen <dave.hansen@linux.intel.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Magnus Lindholm <linmag7@gmail.com>	[alpha]
Acked-by: Dinh Nguyen <dinguyen@kernel.org>	[nios2]
Acked-by: Andreas Larsson <andreas@gaisler.com>	[sparc]
Acked-by: David Hildenbrand (Arm) <david@kernel.org>
Acked-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Cc: "Borislav Petkov (AMD)" <bp@alien8.de>
Cc: David S. Miller <davem@davemloft.net>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Guo Ren <guoren@kernel.org>
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: 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
..
alternative.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
asm-offsets.h
asmregs.h
assembly.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
atomic.h locking/atomic: parisc: add preprocessor symbols 2023-06-05 09:57:16 +02:00
barrier.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
bitops.h parisc: Add __attribute_const__ to ffs()-family implementations 2025-09-08 14:58:51 -07:00
bug.h parisc architecture fixes and updates for kernel v6.19-rc1: 2025-12-06 16:24:52 -08:00
cache.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
cacheflush.h parisc: Try to fix random segmentation faults in package builds 2024-06-12 01:57:05 +02:00
cachetype.h Introduce cpu_dcache_is_aliasing() across all architectures 2024-02-22 15:27:19 -08:00
checksum.h parisc: Strip upper 32 bit of sum in csum_ipv6_magic for 64-bit builds 2024-02-27 22:51:45 +01:00
cmpxchg.h parisc: add u16 support to cmpxchg() 2024-04-09 22:06:00 -07:00
compat_ucontext.h
compat.h asm-generic: compat: Cleanup duplicate definitions 2022-04-26 13:35:54 -07:00
current.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
delay.h
dma-mapping.h dma-mapping: no need to pass a bus_type into get_arch_dma_ops() 2023-02-15 12:35:20 +01:00
dma.h parisc: dma: Add prototype for pcxl_dma_start 2023-08-10 19:12:16 +02:00
dwarf.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
eisa_bus.h
eisa_eeprom.h
elf.h parisc: fix mmap_base calculation when stack grows upwards 2023-11-15 15:30:09 -08:00
extable.h parisc: Fix random data corruption from exception handler 2024-01-30 17:18:58 +01:00
fixmap.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
floppy.h floppy: Replace custom SZ_64K constant 2025-08-25 14:46:42 -06:00
ftrace.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
futex.h uaccess: remove CONFIG_SET_FS 2022-02-25 09:36:06 +01:00
grfioctl.h parisc: Drop HP-UX constants and structs from grfioctl.h 2023-05-03 17:43:26 +02:00
hardirq.h
hardware.h parisc: Avoid printing the hardware path twice 2022-10-31 15:37:14 +01:00
hash.h
hugetlb.h mm: hugetlb: Add huge page size param to huge_ptep_get_and_clear() 2025-02-27 17:40:57 +00:00
io.h - The 6 patch series "Enable strict percpu address space checks" from 2025-04-01 09:29:18 -07:00
irq.h
irqflags.h parisc: Check if IRQs are disabled when calling arch_local_irq_restore() 2023-06-30 17:14:13 +02:00
jump_label.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
kbdleds.h
Kbuild char/agp: introduce asm-generic/agp.h 2023-02-13 22:13:29 +01:00
kexec.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
kfence.h parisc: Add KFENCE support 2021-10-30 23:11:00 +02:00
kgdb.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
kprobes.h parisc/kprobes: always include asm-generic/kprobes.h 2024-02-16 20:18:03 +01:00
ldcw.h parisc: Mark lock_aligned variables 16-byte aligned on SMP 2023-11-25 09:43:17 +01:00
led.h parisc: led: Rewrite LED/LCD driver to utilizize Linux LED subsystem 2023-08-28 17:58:14 +02:00
linkage.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
mman.h mm: refactor arch_calc_vm_flag_bits() and arm64 MTE handling 2024-11-05 16:49:55 -08:00
mmu_context.h parisc: Use constants to encode the space registers like SR_KERNEL 2022-03-11 19:49:31 +01:00
mmu.h parisc: Add vDSO support 2022-03-11 19:49:30 +01:00
mmzone.h
module.h
page.h treewide: provide a generic clear_user_page() variant 2026-01-20 19:24:39 -08:00
parisc-device.h driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
parport.h
pci.h PCI: Remove pci_get_legacy_ide_irq() and asm-generic/pci.h 2022-07-22 17:23:45 -05:00
pdc_chassis.h
pdc.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
pdcpat.h parisc: Add PDC PAT call to get free running 64-bit counter 2026-02-07 00:45:19 +01:00
perf_event.h parisc: Add initial kernel-side perf_event support 2025-10-07 19:35:51 +02:00
perf.h
pgalloc.h mm: pass mm down to pagetable_{pte,pmd}_ctor 2025-05-11 17:48:21 -07:00
pgtable.h arch, mm: consolidate empty_zero_page 2026-04-05 13:53:01 -07:00
prefetch.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
processor.h parisc: constify mmap_upper_limit() parameter 2025-09-21 14:22:14 -07:00
psw.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
ptrace.h parisc: Use PRIV_USER and PRIV_KERNEL in ptrace.h 2021-11-01 07:36:00 +01:00
ropes.h parisc: sba-iommu: Fix sparse warnigs 2023-08-31 21:42:42 +02:00
rt_sigframe.h parisc: Add vDSO support 2022-03-11 19:49:30 +01:00
runway.h parisc: ccio-dma: Create private runway procfs root entry 2023-08-28 18:00:27 +02:00
seccomp.h
sections.h asm-generic: Refactor dereference_[kernel]_function_descriptor() 2022-02-16 23:25:11 +11:00
serial.h
shmparam.h parisc: shmparam.h: Document aliasing requirements of PA-RISC 2023-09-07 08:00:32 +02:00
signal.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
smp.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
socket.h
sparsemem.h
special_insns.h parisc: Check region is readable by user in raw_copy_from_user() 2025-07-25 22:45:23 +02:00
spinlock_types.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
spinlock.h parisc: Fix lightweight spinlock checks to not break futexes 2023-08-10 17:32:09 +02:00
string.h
superio.h
switch_to.h
syscall.h syscall.h: introduce syscall_set_nr() 2025-05-11 17:48:15 -07:00
text-patching.h asm-generic: introduce text-patching.h 2024-11-07 14:25:15 -08:00
thread_info.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
timex.h parisc: define get_cycles macro for arch-override 2022-05-13 23:59:23 +02:00
tlb.h parisc: mm: enable MMU_GATHER_RCU_TABLE_FREE 2026-02-06 15:47:18 -08:00
tlbflush.h parisc: Add vDSO support 2022-03-11 19:49:30 +01:00
topology.h parisc: Switch from GENERIC_CPU_DEVICES to GENERIC_ARCH_TOPOLOGY 2022-03-29 21:37:12 +02:00
traps.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
uaccess.h parisc: Revise __get_user() to probe user read access 2025-07-25 22:45:24 +02:00
ucontext.h
unistd.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
unwind.h
vdso.h parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-05-04 20:46:27 +02:00
video.h Fix access to video_is_primary_device() when compiled without CONFIG_VIDEO 2025-09-10 09:35:33 -05:00
vmalloc.h