diff options
author | Christoph Hellwig <hch@lst.de> | 2024-10-23 07:36:36 +0200 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2024-10-28 22:44:28 +0100 |
commit | c5c3238d9b8cee58cd4b08bbbe9347a94a566390 (patch) | |
tree | 3385a96ef2934aae9eb1c034bee9c3855727734a /arch/loongarch/include/asm/page.h | |
parent | asm-generic/io.h: Remove I/O port accessors for HAS_IOPORT=n (diff) | |
download | linux-c5c3238d9b8cee58cd4b08bbbe9347a94a566390.tar.xz linux-c5c3238d9b8cee58cd4b08bbbe9347a94a566390.zip |
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.
Note with this patch powerpc loses the CONFIG_DEBUG_VIRTUAL pfn_valid
check. It will be added back in a generic version later.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/loongarch/include/asm/page.h')
-rw-r--r-- | arch/loongarch/include/asm/page.h | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/arch/loongarch/include/asm/page.h b/arch/loongarch/include/asm/page.h index e85df33f11c7..8b4e6b280f2b 100644 --- a/arch/loongarch/include/asm/page.h +++ b/arch/loongarch/include/asm/page.h @@ -81,9 +81,6 @@ struct page *tlb_virt_to_page(unsigned long kaddr); #define pfn_to_phys(pfn) __pfn_to_phys(pfn) #define phys_to_pfn(paddr) __phys_to_pfn(paddr) -#define page_to_phys(page) pfn_to_phys(page_to_pfn(page)) -#define phys_to_page(paddr) pfn_to_page(phys_to_pfn(paddr)) - #ifndef CONFIG_KFENCE #define page_to_virt(page) __va(page_to_phys(page)) |