linux/arch/mips/include/asm
Lorenzo Stoakes c707a68f94 mm: abstract io_remap_pfn_range() based on PFN
The only instances in which we customise this function are ones in which we
customise the PFN used.

Instances where architectures were not passing the pgprot value through
pgprot_decrypted() are ones where pgprot_decrypted() was a no-op anyway, so
we can simply always pass pgprot through this function.

Use this fact to simplify the use of io_remap_pfn_range(), by abstracting
the PFN via io_remap_pfn_range_pfn() and using this instead of providing a
general io_remap_pfn_range() function per-architecture.

Link: https://lkml.kernel.org/r/d086191bf431b58ce3b231b4f4f555d080f60327.1760959442.git.lorenzo.stoakes@oracle.com
Suggested-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Andreas Larsson <andreas@gaisler.com>
Cc: Andrey Konovalov <andreyknvl@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: Baoquan He <bhe@redhat.com>
Cc: Chatre, Reinette <reinette.chatre@intel.com>
Cc: Christian Borntraeger <borntraeger@linux.ibm.com>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Dave Jiang <dave.jiang@intel.com>
Cc: Dave Martin <dave.martin@arm.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Dmitriy Vyukov <dvyukov@google.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Guo Ren <guoren@kernel.org>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: James Morse <james.morse@arm.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Jann Horn <jannh@google.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Kevin Tian <kevin.tian@intel.com>
Cc: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Cc: Liam Howlett <liam.howlett@oracle.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Nicolas Pitre <nico@fluxnic.net>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Pedro Falcato <pfalcato@suse.de>
Cc: Robin Murohy <robin.murphy@arm.com>
Cc: Sumanth Korikkar <sumanthk@linux.ibm.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Sven Schnelle <svens@linux.ibm.com>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: "Uladzislau Rezki (Sony)" <urezki@gmail.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Vishal Verma <vishal.l.verma@intel.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2025-11-16 17:28:12 -08:00
..
dec mips: Replace __ASSEMBLY__ with __ASSEMBLER__ in the mips headers 2025-08-29 22:34:29 +02:00
fw add intptr_t 2023-06-09 17:44:13 -07:00
ip32
mach-ath25 MIPS: Remove TX39XX support 2022-03-01 10:07:22 +01:00
mach-ath79 MIPS: Remove TX39XX support 2022-03-01 10:07:22 +01:00
mach-au1x00 MIPS: Remove unused function dump_au1000_dma_channel() in dma.c 2024-08-29 10:38:18 +02:00
mach-bcm47xx MIPS: BCM47XX: Add support for Huawei B593u-12 2023-03-14 17:05:14 +01:00
mach-bcm63xx PCI: Add defines for normal and subtractive PCI bridges 2022-02-17 15:29:35 -06:00
mach-bmips
mach-cavium-octeon locking: remove spin_lock_prefetch 2023-08-12 09:18:47 -07:00
mach-cobalt MIPS: Cobalt: Fix missing prototypes 2024-01-22 10:32:21 +01:00
mach-db1x00
mach-dec MIPS: Remove TX39XX support 2022-03-01 10:07:22 +01:00
mach-generic mips: Replace __ASSEMBLY__ with __ASSEMBLER__ in the mips headers 2025-08-29 22:34:29 +02:00
mach-ingenic MIPS: Remove TX39XX support 2022-03-01 10:07:22 +01:00
mach-ip22
mach-ip27 arch, mm: move definition of node_data to generic code 2024-09-03 21:15:28 -07:00
mach-ip28
mach-ip30 MIPS: Update Joshua Kinard's e-mail address 2025-07-28 09:57:24 +02:00
mach-ip32
mach-jazz mips: remove redundant macro mc146818_decode_year 2025-07-16 18:47:08 +02:00
mach-lantiq MIPS: lantiq: xway: add prototype for ltq_get_cp1_base() 2025-07-03 12:35:10 +02:00
mach-loongson2ef MIPS: loongson2ef: lemote-2f: add missing function prototypes 2025-05-30 14:19:02 +02:00
mach-loongson64 mips: fix PCI_IOBASE definition 2025-03-18 22:42:42 +01:00
mach-malta mips: remove redundant macro mc146818_decode_year 2025-07-16 18:47:08 +02:00
mach-n64
mach-pic32
mach-ralink mips: fix PCI_IOBASE definition 2025-03-18 22:42:42 +01:00
mach-rc32434 MIPS: Fix Macro name 2025-03-19 10:22:22 +01:00
mach-rm mips/mach-rm: remove custom mc146818rtc.h file 2025-07-16 18:39:28 +02:00
mach-sibyte
mach-tx49xx MIPS: TXX9: Remove rbtx4939 board support 2022-01-02 14:10:40 +01:00
mips-boards mips: Replace __ASSEMBLY__ with __ASSEMBLER__ in the mips headers 2025-08-29 22:34:29 +02:00
octeon mips: cavium-octeon: Move octeon-crypto.h into asm directory 2025-06-30 09:26:19 -07:00
pci mips: Replace __ASSEMBLY__ with __ASSEMBLER__ in the mips headers 2025-08-29 22:34:29 +02:00
sgi MIPS: Update Joshua Kinard's e-mail address 2025-07-28 09:57:24 +02:00
sibyte mips: Replace __ASSEMBLY__ with __ASSEMBLER__ in the mips headers 2025-08-29 22:34:29 +02:00
sn mips: Replace __ASSEMBLY__ with __ASSEMBLER__ in the mips headers 2025-08-29 22:34:29 +02:00
txx9 MIPS: Remove TX39XX support 2022-03-01 10:07:22 +01:00
vdso mips: Replace __ASSEMBLY__ with __ASSEMBLER__ in the mips headers 2025-08-29 22:34:29 +02:00
xtalk mips: Replace __ASSEMBLY__ with __ASSEMBLER__ in the mips headers 2025-08-29 22:34:29 +02:00
Kbuild asm-generic: introduce text-patching.h 2024-11-07 14:25:15 -08:00
abi.h
addrspace.h mips: Replace __ASSEMBLY__ with __ASSEMBLER__ in the mips headers 2025-08-29 22:34:29 +02:00
amon.h
arch_hweight.h
asm-eva.h mips: Replace __ASSEMBLY__ with __ASSEMBLER__ in the mips headers 2025-08-29 22:34:29 +02:00
asm-offsets.h
asm-prototypes.h MIPS: Restore symbol versions for copy_page_cpu and clear_page_cpu 2022-12-01 11:46:05 +01:00
asm.h mips: Replace __ASSEMBLY__ with __ASSEMBLER__ in the mips headers 2025-08-29 22:34:29 +02:00
asmmacro-32.h MIPS: Always use -Wa,-msoft-float and eliminate GAS_HAS_SET_HARDFLOAT 2023-01-26 12:41:16 +09:00
asmmacro-64.h
asmmacro.h MIPS: Implement microMIPS MT ASE helpers 2024-02-23 10:13:47 +01:00
atomic.h locking/atomic: make atomic*_{cmp,}xchg optional 2023-06-05 09:57:14 +02:00
barrier.h
bcache.h
bitops.h mips: Add __attribute_const__ to ffs()-family implementations 2025-09-08 14:58:51 -07:00
bitrev.h
bmips-spaces.h
bmips.h mips: Replace __ASSEMBLY__ with __ASSEMBLER__ in the mips headers 2025-08-29 22:34:29 +02:00
bootinfo.h MIPS: Ingenic: Add system type for new Ingenic SoCs. 2021-07-19 13:16:42 +02:00
branch.h
break.h
bug.h
bugs.h mips/cpu: Switch to arch_cpu_finalize_init() 2023-06-16 10:16:00 +02:00
cache.h mips: move cache declarations into header 2023-12-10 17:21:41 -08:00
cacheflush.h mips: mm: convert __flush_dcache_pages() to __flush_dcache_folio_pages() 2025-09-21 14:22:06 -07:00
cacheops.h
cachetype.h Introduce cpu_dcache_is_aliasing() across all architectures 2024-02-22 15:27:19 -08:00
cdmm.h mips: bus: make mips_cdmm_bustype const 2024-02-20 13:36:34 +01:00
cevt-r4k.h
checksum.h MIPS: Add 'memory' clobber to csum_ipv6_magic() inline assembler 2024-02-12 23:03:19 +01:00
clocksource.h
cmp.h MIPS: Remove unused declarations in asm/cmp.h 2024-08-29 10:42:41 +02:00
cmpxchg.h locking/arch: Rename all internal __xchg() names to __arch_xchg() 2023-04-29 09:08:44 +02:00
compat-signal.h
compat.h asm-generic: compat: Cleanup duplicate definitions 2022-04-26 13:35:54 -07:00
compiler.h
cop2.h MIPS: Remove NETLOGIC support 2021-10-24 17:24:47 +02:00
cpu-features.h MIPS: cpu-features: Use boot_cpu_type for CPU type based features 2023-06-09 09:56:22 +02:00
cpu-info.h MIPS: disable MMID when not supported by the hardware 2025-07-16 18:34:36 +02:00
cpu-type.h MIPS: loongson32: Switch to generic core 2025-08-29 22:34:31 +02:00
cpu.h MIPS: Unify Loongson1 PRID_REV 2025-08-29 22:34:31 +02:00
cpufeature.h
debug.h MIPS: Fix typos 2024-01-08 10:39:12 +01:00
delay.h
div64.h MIPS: Avoid handcoded DIVU in `__div64_32' altogether 2021-04-23 13:40:31 +02:00
dma-direct.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 PCI: Move isa_dma_bridge_buggy out of asm/dma.h 2022-07-22 17:24:47 -05:00
dmi.h mips: dmi: Fix early remap on MIPS32 2023-12-21 15:31:25 +01:00
ds1287.h MIPS: ds1287: Match ds1287_set_base_clock() function types 2025-02-27 10:47:33 +01:00
dsemul.h
dsp.h
edac.h
elf.h
elfcore-compat.h
errno.h
eva.h mips: Replace __ASSEMBLY__ with __ASSEMBLER__ in the mips headers 2025-08-29 22:34:29 +02:00
exec.h
extable.h
fixmap.h mips: fix comment about pgtable_init() 2023-04-05 19:42:52 -07:00
floppy.h floppy: Remove unused CROSS_64KB() macro from arch/ code 2025-08-25 14:46:42 -06:00
fpregdef.h MIPS: Always use -Wa,-msoft-float and eliminate GAS_HAS_SET_HARDFLOAT 2023-01-26 12:41:16 +09:00
fpu.h MIPS: Implement ieee754 NAN2008 emulation mode 2024-07-12 13:09:25 +02:00
fpu_emulator.h
ftrace.h mips: Replace __ASSEMBLY__ with __ASSEMBLER__ in the mips headers 2025-08-29 22:34:29 +02:00
futex.h MIPS: remove asm/war.h 2022-02-22 09:35:49 +01:00
ginvt.h MIPS: Avoid macro redefinitions 2021-09-23 11:23:35 +02:00
gio_device.h
gt64120.h
hardirq.h
hazards.h mips: Replace __ASSEMBLY__ with __ASSEMBLER__ in the mips headers 2025-08-29 22:34:29 +02:00
highmem.h MIPS: Fix PKMAP with 32-bit MIPS huge page support 2021-06-30 14:41:32 +02:00
hpet.h
hugetlb.h mm/hugetlb: remove prepare_hugepage_range() 2025-07-13 16:38:19 -07:00
hw_irq.h
i8259.h
idle.h MIPS: rename rollback_handler with skipover_handler 2025-04-27 10:12:44 +02:00
inst.h
io.h - The 6 patch series "Enable strict percpu address space checks" from 2025-04-01 09:29:18 -07:00
irq.h nmi_backtrace: allow excluding an arbitrary CPU 2023-08-18 10:19:00 -07:00
irq_cpu.h
irq_gt641xx.h
irq_regs.h
irqflags.h mips: Replace __ASSEMBLY__ with __ASSEMBLER__ in the mips headers 2025-08-29 22:34:29 +02:00
isa-rev.h
isadep.h MIPS: Remove TX39XX support 2022-03-01 10:07:22 +01:00
jazz.h mips: Replace __ASSEMBLY__ with __ASSEMBLER__ in the mips headers 2025-08-29 22:34:29 +02:00
jazzdma.h
jump_label.h mips: Replace __ASSEMBLY__ with __ASSEMBLER__ in the mips headers 2025-08-29 22:34:29 +02:00
kdebug.h
kexec.h mips, kexec: fix the incorrect ifdeffery and dependency of CONFIG_KEXEC 2023-12-12 17:20:18 -08:00
kgdb.h mips: kgdb: adjust the comment to the actual ifdef condition 2021-12-16 15:47:58 +01:00
kprobes.h kprobes: unify kprobes_exceptions_nofify() prototypes 2023-11-10 19:59:05 +09:00
kvm_host.h KVM: Drop kvm_arch_sync_events() now that all implementations are nops 2025-02-26 13:17:23 -05:00
kvm_types.h
linkage.h mips: Replace __ASSEMBLY__ with __ASSEMBLER__ in the mips headers 2025-08-29 22:34:29 +02:00
local.h locking/local, arch: Rewrite local_add_unless() as a static inline function 2023-10-04 11:38:11 +02:00
maar.h
machine.h
mc146818-time.h mips/malta,loongson2ef: use generic mc146818_get_time function 2025-07-16 18:48:40 +02:00
mc146818rtc.h
mips-cm.h MIPS: cm: Fix warning if MIPS_CM is disabled 2025-03-19 10:22:40 +01:00
mips-cpc.h MIPS: Fix typos 2024-01-08 10:39:12 +01:00
mips-cps.h MIPS: CPS: Improve mips_cps_first_online_in_cluster() 2025-07-16 18:34:49 +02:00
mips-gic.h MIPS: GIC: Generate redirect block accessors 2024-07-09 10:48:28 +02:00
mips-r2-to-r6-emul.h
mips_mt.h MIPS: MT: Remove unused function mips_mt_regdump() 2024-08-29 10:41:36 +02:00
mipsmtregs.h mips: Replace __ASSEMBLY__ with __ASSEMBLER__ in the mips headers 2025-08-29 22:34:29 +02:00
mipsprom.h
mipsregs.h mips: Replace __ASSEMBLY__ with __ASSEMBLER__ in the mips headers 2025-08-29 22:34:29 +02:00
mmiowb.h mips: add <asm-generic/io.h> including 2023-11-23 10:32:52 +01:00
mmu.h
mmu_context.h
mmzone.h MIPS: make setup_zero_pages() use memblock 2025-03-17 22:06:51 -07:00
module.h
msa.h mips: Replace __ASSEMBLY__ with __ASSEMBLER__ in the mips headers 2025-08-29 22:34:29 +02:00
msc01_ic.h
paccess.h
page.h vdso: Introduce vdso/page.h 2024-10-16 00:13:04 +02:00
pci.h MIPS: Fix typos 2024-01-08 10:39:12 +01:00
perf_event.h
pgalloc.h mm: pass mm down to pagetable_{pte,pmd}_ctor 2025-05-11 17:48:21 -07:00
pgtable-32.h mm/treewide: remove pXd_huge() 2024-04-25 20:55:47 -07:00
pgtable-64.h mm: define general function pXd_init() 2024-11-11 17:22:27 -08:00
pgtable-bits.h MIPS: Fix typos 2024-01-08 10:39:12 +01:00
pgtable.h mm: abstract io_remap_pfn_range() based on PFN 2025-11-16 17:28:12 -08:00
pm-cps.h
pm.h mips: Replace __ASSEMBLY__ with __ASSEMBLER__ in the mips headers 2025-08-29 22:34:29 +02:00
prefetch.h mips: Replace __ASSEMBLY__ with __ASSEMBLER__ in the mips headers 2025-08-29 22:34:29 +02:00
processor.h mips: add missing declarations 2023-12-10 17:21:41 -08:00
prom.h MIPS: Fix wrong comments in asm/prom.h 2022-03-14 15:09:27 +01:00
ptrace.h MIPS: Fix MAX_REG_OFFSET 2025-04-30 20:04:59 +02:00
r4k-timer.h MIPS: sync-r4k: Rework based on x86 tsc_sync 2024-07-03 16:50:12 +02:00
r4kcache.h mips: move cache declarations into header 2023-12-10 17:21:41 -08:00
reboot.h
reg.h
regdef.h mips: Replace __ASSEMBLY__ with __ASSEMBLER__ in the mips headers 2025-08-29 22:34:29 +02:00
rtlx.h MIPS: Remove deprecated CONFIG_MIPS_CMP 2023-04-12 15:01:09 +02:00
seccomp.h
setup.h MIPS: Add prototypes for plat_post_relocation() and relocate_kernel() 2024-04-15 10:22:45 +02:00
sgialib.h
sgiarcs.h
shmparam.h
sigcontext.h
signal.h mips: add missing declarations 2023-12-10 17:21:41 -08:00
sim.h
smp-cps.h mips: Replace __ASSEMBLY__ with __ASSEMBLER__ in the mips headers 2025-08-29 22:34:29 +02:00
smp-ops.h asm-generic cleanups for 6.8 2024-01-10 18:13:44 -08:00
smp.h MIPS: Loongson64: Switch to SYNC_R4K 2024-07-23 09:29:49 +02:00
sni.h MIPS: remove orphan sni_cpu_time_init() declaration 2022-09-19 16:36:55 +02:00
socket.h mips, net: ensure that SOCK_COREDUMP is defined 2025-05-23 11:02:16 +02:00
sparsemem.h
spinlock.h
spinlock_types.h
spram.h mips: spram: fix missing prototype warning for spram_config 2023-12-10 17:21:41 -08:00
stackframe.h MIPS: Take in account load hazards for HI/LO restoring 2024-05-03 14:22:38 +02:00
stackprotector.h stackprotector: actually use get_random_canary() 2022-11-18 02:18:10 +01:00
stacktrace.h
string.h
switch_to.h mips: asm: fix warning when disabling MIPS_FP_SUPPORT 2024-10-30 23:45:28 +01:00
sync.h mips: Replace __ASSEMBLY__ with __ASSEMBLER__ in the mips headers 2025-08-29 22:34:29 +02:00
syscall.h syscall.h: introduce syscall_set_nr() 2025-05-11 17:48:15 -07:00
syscalls.h mips: add asm/syscalls.h header 2023-12-10 17:21:38 -08:00
thread_info.h mips: Replace __ASSEMBLY__ with __ASSEMBLER__ in the mips headers 2025-08-29 22:34:29 +02:00
time.h mips: Handle KCOV __init vs inline mismatch 2025-07-21 21:42:49 -07:00
timex.h MIPS: Fix typos 2024-01-08 10:39:12 +01:00
tlb.h
tlbdebug.h
tlbex.h mips: move build_tlb_refill_handler() prototype 2023-12-10 17:21:39 -08:00
tlbflush.h
tlbmisc.h
topology.h MIPS: SMP: Implement parallel CPU bring up for EyeQ 2025-04-27 09:45:15 +02:00
traps.h asm-generic cleanups for 6.8 2024-01-10 18:13:44 -08:00
txx9irq.h MIPS: Remove TX39XX support 2022-03-01 10:07:22 +01:00
txx9pio.h
txx9tmr.h MIPS: Remove TX39XX support 2022-03-01 10:07:22 +01:00
types.h
uaccess.h uaccess: generalize access_ok() 2022-02-25 09:36:05 +01:00
uasm.h mips: unhide uasm_in_compat_space_p() declaration 2023-12-10 17:21:40 -08:00
unaligned-emul.h MIPS: Fix build error due to PTR used in more places 2022-01-27 09:04:19 +01:00
unistd.h mips: Replace __ASSEMBLY__ with __ASSEMBLER__ in the mips headers 2025-08-29 22:34:29 +02:00
unroll.h
uprobes.h
vdso.h MIPS: vdso: Use generic union vdso_data_store 2024-02-20 20:56:01 +01:00
vermagic.h MIPS: Remove VR41xx support 2022-07-14 11:52:29 +02:00
vga.h asm/vga.h: don't bother with scr_mem{cpy,move}v() unless we need to 2024-11-11 21:51:42 +01:00
video.h arch: Rename fbdev header and source files 2024-05-03 17:07:50 +02:00
vmalloc.h
vpe.h MIPS: vpe-mt: add missing prototypes for vpe_{alloc,start,stop,free} 2025-07-16 18:26:39 +02:00
watch.h
wbflush.h
yamon-dt.h