]> www.infradead.org Git - users/hch/misc.git/commit
asm-generic: provide generic page_to_phys and phys_to_page implementations
authorChristoph Hellwig <hch@lst.de>
Sun, 6 Oct 2024 07:31:05 +0000 (09:31 +0200)
committerChristoph Hellwig <hch@lst.de>
Fri, 11 Oct 2024 06:31:44 +0000 (08:31 +0200)
commit7b61b0d872c0443feeb22385ff91a433d129eab4
tree0a5dfa5f188bd84368b87029f50d63ea81b26c13
parent8f602276d3902642fdc3429b548d73c745446601
asm-generic: provide generic page_to_phys and phys_to_page implementations

page_to_phys is duplicated by all architectures, and from some strange
reason placed in <asm/io.h> where it doesn't fit at all.

phys_to_page is only provided by a few architectures despite having a lot
of open coded users.

Provide generic versions in <asm-generic/memory_model.h> to make these
helpers more easily usable.

Signed-off-by: Christoph Hellwig <hch@lst.de>
22 files changed:
arch/alpha/include/asm/io.h
arch/arc/include/asm/io.h
arch/arm/include/asm/memory.h
arch/arm64/include/asm/memory.h
arch/csky/include/asm/page.h
arch/hexagon/include/asm/page.h
arch/loongarch/include/asm/page.h
arch/m68k/include/asm/virtconvert.h
arch/microblaze/include/asm/page.h
arch/mips/include/asm/io.h
arch/nios2/include/asm/io.h
arch/openrisc/include/asm/page.h
arch/parisc/include/asm/page.h
arch/powerpc/include/asm/io.h
arch/riscv/include/asm/page.h
arch/s390/include/asm/page.h
arch/sh/include/asm/page.h
arch/sparc/include/asm/page.h
arch/um/include/asm/pgtable.h
arch/x86/include/asm/io.h
arch/xtensa/include/asm/page.h
include/asm-generic/memory_model.h