linux/arch/s390/include/asm
Matthew Wilcox (Oracle) 53fbef56e0 mm: introduce memdesc_flags_t
Patch series "Add and use memdesc_flags_t".

At some point struct page will be separated from struct slab and struct
folio.  This is a step towards that by introducing a type for the 'flags'
word of all three structures.  This gives us a certain amount of type
safety by establishing that some of these unsigned longs are different
from other unsigned longs in that they contain things like node ID,
section number and zone number in the upper bits.  That lets us have
functions that can be easily called by anyone who has a slab, folio or
page (but not easily by anyone else) to get the node or zone.

There's going to be some unusual merge problems with this as some odd bits
of the kernel decide they want to print out the flags value or something
similar by writing page->flags and now they'll need to write page->flags.f
instead.  That's most of the churn here.  Maybe we should be removing
these things from the debug output?


This patch (of 11):

Wrap the unsigned long flags in a typedef.  In upcoming patches, this will
provide a strong hint that you can't just pass a random unsigned long to
functions which take this as an argument.

[willy@infradead.org: s/flags/flags.f/ in several architectures]
  Link: https://lkml.kernel.org/r/aKMgPRLD-WnkPxYm@casper.infradead.org
[nicola.vetrini@gmail.com: mips: fix compilation error]
  Link: https://lore.kernel.org/lkml/CA+G9fYvkpmqGr6wjBNHY=dRp71PLCoi2341JxOudi60yqaeUdg@mail.gmail.com/
  Link: https://lkml.kernel.org/r/20250825214245.1838158-1-nicola.vetrini@gmail.com
Link: https://lkml.kernel.org/r/20250805172307.1302730-1-willy@infradead.org
Link: https://lkml.kernel.org/r/20250805172307.1302730-2-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: Zi Yan <ziy@nvidia.com>
Cc: Shakeel Butt <shakeel.butt@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2025-09-13 16:55:07 -07:00
..
trace s390/hiperdispatch: Add trace events 2024-08-29 22:56:35 +02:00
vdso s390/time: Remove in-kernel time steering 2025-07-21 12:41:55 +02:00
abs_lowcore.h s390/lowcore: Convert relocated lowcore alternative to machine feature 2025-03-04 17:18:05 +01:00
access-regs.h s390/acrs: cleanup access register handling 2024-02-12 15:03:33 +01:00
airq.h s390/airq: remove lsi_mask from airq_struct 2023-08-30 11:03:28 +02:00
alternative.h s390: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-06-16 16:23:02 +02:00
ap.h s390/ap: Unmask SLCF bit in card and queue ap functions sysfs 2025-07-31 18:59:26 +02:00
appldata.h s390: Convert MACHINE_IS_[LPAR|VM|KVM], etc, machine_is_[lpar|vm|kvm]() 2025-03-04 17:18:07 +01:00
arch_hweight.h s390: Use MARCH_HAS_*_FEATURES defines 2024-09-07 17:12:42 +02:00
archrandom.h Random number generator updates for Linux 6.0-rc1. 2022-08-02 17:31:35 -07:00
asce.h s390/mm: Reimplement lazy ASCE handling 2025-04-14 11:23:21 +02:00
asm-const.h s390: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-06-16 16:23:02 +02:00
asm-extable.h s390/uaccess: Shorten raw_copy_from_user() / raw_copy_to_user() inline assemblies 2025-03-04 17:18:03 +01:00
asm-prototypes.h s390/expoline: Make modules use kernel expolines 2024-04-17 13:38:03 +02:00
asm.h s390: Rename GCC_ASM_FLAG_OUTPUT_BROKEN to CC_ASM_FLAG_OUTPUT_BROKEN 2025-01-26 17:24:04 +01:00
atomic_ops.h s390/atomic_ops: Let __atomic_add_const() variants always return void 2025-03-04 17:34:04 +01:00
atomic.h s390/atomic: Provide arch_atomic_*_and_test() implementations 2024-12-15 16:19:03 +01:00
barrier.h s390: Use MARCH_HAS_*_FEATURES defines 2024-09-07 17:12:42 +02:00
bitops.h s390/bitops: Disable arch_test_bit() optimization for PROFILE_ALL_BRANCHES 2025-02-11 19:35:08 +01:00
boot_data.h s390/boot: Add timestamps to early boot messages 2025-01-26 17:24:02 +01:00
bug.h s390/bug: remove entry size from __bug_table section 2024-02-14 13:50:53 +01:00
cache.h
ccwdev.h driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
ccwgroup.h
checksum.h s390: Remove superfluous new lines from inline assemblies 2024-12-15 16:19:03 +01:00
chpid.h
chsc.h s390/chsc: use notifier for AP configuration changes 2024-04-09 17:29:55 +02:00
cio.h s390/virtio_ccw: use DMA handle from DMA API 2024-03-13 09:23:46 +01:00
clocksource.h
clp.h
cmb.h
cmpxchg.h s390/cmpxchg: Provide arch_try_cmpxchg128() 2024-11-12 14:01:28 +01:00
compat.h s390/uapi: cover statfs padding by growing f_spare 2023-05-17 15:20:17 +02:00
cpacf.h s390/crypto: Add protected key hmac subfunctions for KMAC 2025-06-26 18:52:33 +08:00
cpcmd.h
cpu_mf-insn.h s390: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-06-16 16:23:02 +02:00
cpu_mf.h s390: Use inline qualifier for all EX_TABLE and ALTERNATIVE inline assemblies 2025-03-18 17:13:51 +01:00
cpu.h s390: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-06-16 16:23:02 +02:00
cpufeature.h watchdog: diag288_wdt: Implement module autoload 2025-04-16 09:26:49 +02:00
cputime.h s390/idle: remove arch_cpu_idle_time() and corresponding code 2023-02-09 20:11:23 +01:00
crw.h
css_chars.h s390/qdio: Rename feature flag aif_osa to aif_qdio 2025-01-03 11:00:53 +01:00
ctlreg.h s390: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-06-16 16:23:02 +02:00
current.h s390/current: Implement current with inline assembly 2025-03-18 17:13:04 +01:00
dat-bits.h s390/kvm: Move bitfields for dat tables 2024-07-10 19:50:45 +02:00
debug.h s390/pci: Add pci_msg debug view to PCI report 2024-12-16 16:14:27 +01:00
delay.h
diag.h s390: Use inline qualifier for all EX_TABLE and ALTERNATIVE inline assemblies 2025-03-18 17:13:51 +01:00
diag288.h watchdog: diag288_wdt: Implement module autoload 2025-04-16 09:26:49 +02:00
dis.h
dma-types.h s390/mm: provide simple ARCH_HAS_DEBUG_VIRTUAL support 2024-03-13 09:23:49 +01:00
dma.h s390/mm: fix MAX_DMA_ADDRESS physical vs virtual confusion 2023-09-05 20:12:51 +02:00
dwarf.h s390: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-06-16 16:23:02 +02:00
eadm.h s390/cio: use bitwise types to allow for type checking 2024-03-13 09:23:46 +01:00
ebcdic.h s390/ebcdic: Fix length decrement in codepage_convert() 2025-01-13 09:50:18 +01:00
elf.h s390: Remove 2k vs 4k page table leftovers 2025-03-18 17:13:05 +01:00
entry-common.h KVM: s390: Rework guest entry logic 2025-07-21 13:01:03 +00:00
exec.h
extable.h
extmem.h s390: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-06-16 16:23:02 +02:00
facility.h s390/facilities: Fix warning about shadow of global variable 2024-10-10 15:32:43 +02:00
fault.h s390/mm: move translation-exception identification structure to fault.h 2023-10-23 18:21:22 +02:00
fcx.h s390/cio: use bitwise types to allow for type checking 2024-03-13 09:23:46 +01:00
fprobe.h fprobe: Add fprobe_header encoding feature 2024-12-26 10:50:05 -05:00
fpu-insn-asm.h s390: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-06-16 16:23:02 +02:00
fpu-insn.h s390: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-06-16 16:23:02 +02:00
fpu-types.h s390/checksum: provide vector register variant of csum_partial() 2024-02-16 14:30:17 +01:00
fpu.h s390/vx: Convert cpu_has_vx() to cpu feature function 2025-03-04 17:18:07 +01:00
ftrace.h s390: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-06-16 16:23:02 +02:00
ftrace.lds.h
futex.h s390/mm: Reimplement lazy ASCE handling 2025-04-14 11:23:21 +02:00
gmap_helpers.h KVM: s390: Refactor and split some gmap helpers 2025-05-28 17:48:04 +02:00
gmap.h KVM: s390: Refactor and split some gmap helpers 2025-05-28 17:48:04 +02:00
hardirq.h s390: Replace S390_lowcore by get_lowcore() 2024-06-18 17:01:33 +02:00
hiperdispatch.h s390/hiperdispatch: Introduce hiperdispatch 2024-08-29 22:56:35 +02:00
hugetlb.h mm: introduce memdesc_flags_t 2025-09-13 16:55:07 -07:00
hw_irq.h
idals.h s390/cio,idal: fix virtual vs physical address confusion 2024-03-13 09:23:47 +01:00
idle.h s390/irq,idle: simplify idle check 2023-02-15 11:07:01 +01:00
io.h - The 6 patch series "Enable strict percpu address space checks" from 2025-04-01 09:29:18 -07:00
ipl.h s390/ipl: add eckd dump support 2022-12-06 16:18:22 +01:00
irq_work.h arch: consolidate arch_irq_work_raise prototypes 2023-11-23 11:32:29 +01:00
irq.h s390: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-06-16 16:23:02 +02:00
irqflags.h s390/irqflags: do not instrument arch_local_irq_*() with KMSAN 2024-07-03 19:30:25 -07:00
isc.h
itcw.h
jump_label.h s390: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-06-16 16:23:02 +02:00
kasan.h s390/kasan: move shadow mapping to decompressor 2023-03-20 11:02:51 +01:00
Kbuild arch, mm: move definition of node_data to generic code 2024-09-03 21:15:28 -07:00
kdebug.h
kexec.h s390/kdump: Provide is_kdump_kernel() implementation 2024-10-25 16:03:23 +02:00
kfence.h s390/kfence: Split kfence pool into 4k mappings in arch_kfence_init_pool() 2025-03-18 17:13:05 +01:00
kmsan.h s390/kmsan: Fix merge conflict with get_lowcore() introduction 2024-07-23 16:01:51 +02:00
kprobes.h kprobes: unify kprobes_exceptions_nofify() prototypes 2023-11-10 19:59:05 +09:00
kvm_host_types.h s390/kvm: Split kvm_host header file 2025-03-31 12:20:39 +02:00
kvm_host.h KVM: s390: Rework guest entry logic 2025-07-21 13:01:03 +00:00
kvm_para.h
linkage.h s390: make use of CONFIG_FUNCTION_ALIGNMENT 2023-03-20 11:12:46 +01:00
lowcore.h s390: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-06-16 16:23:02 +02:00
maccess.h s390/mm: define Real Memory Copy size and mask macros 2023-08-16 15:13:02 +02:00
machine.h s390: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-06-16 16:23:02 +02:00
march.h s390: Allow to compile with z17 optimizations 2025-04-09 12:12:41 +02:00
mem_encrypt.h s390: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-06-16 16:23:02 +02:00
mmu_context.h s390/mm: Select ARCH_WANT_IRQS_OFF_ACTIVATE_MM 2025-04-14 11:23:21 +02:00
mmu.h s390: Remove 2k vs 4k page table leftovers 2025-03-18 17:13:05 +01:00
module.h s390/module: Provide find_section() helper 2024-09-13 17:28:36 +02:00
msi.h irq/s390: Add arch_is_isolated_msi() for s390 2023-01-11 16:27:23 -04:00
nmi.h s390: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-06-16 16:23:02 +02:00
nospec-branch.h s390: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-06-16 16:23:02 +02:00
nospec-insn.h s390: Explicitly include <linux/export.h> 2025-06-17 18:18:02 +02:00
numa.h
os_info.h s390/os_info: Fix array size in struct os_info 2024-04-29 17:33:29 +02:00
page-states.h s390: Remove __bootdata annotations from declarations 2024-12-15 16:19:04 +01:00
page.h Merge branch 'uaccess-key' into features 2025-06-29 13:21:16 +02:00
pai.h s390/pai: Convert to use flag output macros 2024-11-13 14:31:32 +01:00
pci_clp.h s390/pci: check for relaxed translation capability 2025-02-21 12:01:57 +01:00
pci_debug.h
pci_dma.h iommu/s390: allow larger region tables 2025-04-17 16:43:12 +02:00
pci_insn.h
pci_io.h s390/pci: Align prototypes of zpci IO memcpy functions 2024-10-16 11:33:06 +02:00
pci.h pci-v6.15-changes 2025-03-28 19:36:53 -07:00
percpu.h mm/percpu: conditionally define _shared_alloc_tag via CONFIG_ARCH_MODULE_NEEDS_WEAK_PER_CPU 2025-07-09 22:42:15 -07:00
perf_event.h Performance events changes for v6.13: 2024-11-19 13:34:06 -08:00
pfault.h s390/pfault: cleanup inline assemblies 2023-07-29 14:57:18 +02:00
pgalloc.h mm: pass mm down to pagetable_{pte,pmd}_ctor 2025-05-11 17:48:21 -07:00
pgtable.h s390/mm: Enable THP_SWAP and THP_MIGRATION 2025-07-31 18:59:26 +02:00
physmem_info.h s390/boot: Add physmem tracking debug support 2025-01-26 17:24:02 +01:00
pkey.h s390/pkey/crypto: Introduce xflags param for pkey in-kernel API 2025-04-30 11:34:03 +02:00
pnet.h
preempt.h s390/preempt: Optimize __preempt_count_dec_and_test() 2024-12-15 16:19:03 +01:00
processor.h s390: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-06-16 16:23:02 +02:00
ptrace.h s390 updates for 6.17 merge window 2025-07-29 20:17:08 -07:00
purgatory.h s390: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-06-16 16:23:02 +02:00
qdio.h s390/cio: use bitwise types to allow for type checking 2024-03-13 09:23:46 +01:00
runtime_instr.h
runtime-const.h s390: Add runtime constant support 2024-07-23 15:54:58 +02:00
rwonce.h s390/rwonce: add READ_ONCE_ALIGNED_128() macro 2023-02-28 13:19:05 +01:00
schid.h
sclp.h s390: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-06-16 16:23:02 +02:00
scsw.h s390/cio: use bitwise types to allow for type checking 2024-03-13 09:23:46 +01:00
seccomp.h
sections.h s390/amode31: change type of __samode31, __eamode31, etc 2023-08-30 11:03:27 +02:00
set_memory.h - The series "zram: optimal post-processing target selection" from 2024-11-23 09:58:07 -08:00
setup.h s390/nmi: Print additional information 2025-06-26 15:30:51 +02:00
signal.h
sigp.h s390: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-06-16 16:23:02 +02:00
skey.h s390/skey: Provide infrastructure for executing with non-default access key 2025-06-29 13:12:02 +02:00
smp.h s390/smp: Implement raw_smp_processor_id() with inline assembly 2025-03-18 17:13:04 +01:00
softirq_stack.h s390: Replace S390_lowcore by get_lowcore() 2024-06-18 17:01:33 +02:00
sparsemem.h s390/sparsemem: Provide phys_to_target_node() with CONFIG_NUMA 2024-11-07 10:33:44 +01:00
spinlock_types.h Improve consistency of '#error' directive messages 2024-11-11 17:17:04 -08:00
spinlock.h s390/spinlock: Implement SPINLOCK_LOCKVAL with inline assembly 2025-03-18 17:13:04 +01:00
stacktrace.h s390/entry: Pass the asce as parameter to sie64a() 2024-07-10 19:50:45 +02:00
stp.h s390/time: Add PtP driver 2024-10-30 17:02:39 -07:00
string.h s390/string: Remove strcpy() implementation 2025-04-30 11:41:28 +02:00
syscall_wrapper.h posix-timers: Get rid of [COMPAT_]SYS_NI() uses 2023-12-20 21:30:27 -08:00
syscall.h syscall.h: introduce syscall_set_nr() 2025-05-11 17:48:15 -07:00
sysinfo.h s390/sysinfo: Move stsi() to header file 2025-03-04 17:18:07 +01:00
text-patching.h
thread_info.h s390: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-06-16 16:23:02 +02:00
timex.h s390/time: Use monotonic clock in get_cycles() 2025-07-21 12:41:55 +02:00
tlb.h Generic: 2025-06-02 12:24:58 -07:00
tlbflush.h s390/tlb: Convert MACHINE_HAS_TLB_GUEST to machine_has_tlb_guest() 2025-03-04 17:18:06 +01:00
topology.h s390/smp: Add support for HOTPLUG_SMT 2025-03-31 12:20:39 +02:00
tpi.h s390: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-06-16 16:23:02 +02:00
types.h s390: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-06-16 16:23:02 +02:00
uaccess.h s390/uaccess: Make cmpxchg_user_key() library code 2025-06-29 13:12:01 +02:00
unistd.h clone3: drop __ARCH_WANT_SYS_CLONE3 macro 2024-07-10 14:23:38 +02:00
unwind.h s390/kprobes: replace kretprobe with rethook 2023-01-22 18:42:35 +01:00
uprobes.h
user.h
uv.h Generic: 2025-06-02 12:24:58 -07:00
vdso-symbols.h s390/vdso: Move vdso symbol handling to separate header file 2024-09-13 17:28:36 +02:00
vdso.h s390: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-06-16 16:23:02 +02:00
vmalloc.h
vmlinux.lds.h
vtime.h s390/vtime: Remove duplicate get_lowcore() calls 2024-06-18 17:01:33 +02:00
vtimer.h
word-at-a-time.h s390: Use inline qualifier for all EX_TABLE and ALTERNATIVE inline assemblies 2025-03-18 17:13:51 +01:00
xor.h