diff options
author | Christoph Hellwig <hch@lst.de> | 2024-10-23 07:36:36 +0200 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2024-10-28 21:44:28 +0000 |
commit | c5c3238d9b8cee58cd4b08bbbe9347a94a566390 (patch) | |
tree | 3385a96ef2934aae9eb1c034bee9c3855727734a /arch/um | |
parent | 6f043e75744596968b6547c4bd43e4d30bbb6d6e (diff) |
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/um')
-rw-r--r-- | arch/um/include/asm/pgtable.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/arch/um/include/asm/pgtable.h b/arch/um/include/asm/pgtable.h index 83373c9963e7..faab5a2a4b06 100644 --- a/arch/um/include/asm/pgtable.h +++ b/arch/um/include/asm/pgtable.h @@ -287,9 +287,7 @@ static inline int pte_same(pte_t pte_a, pte_t pte_b) * and a page entry and page directory to the page they refer to. */ -#define phys_to_page(phys) pfn_to_page(phys_to_pfn(phys)) #define __virt_to_page(virt) phys_to_page(__pa(virt)) -#define page_to_phys(page) pfn_to_phys(page_to_pfn(page)) #define virt_to_page(addr) __virt_to_page((const unsigned long) addr) #define mk_pte(page, pgprot) \ |