diff options
author | Christoph Hellwig <hch@lst.de> | 2024-10-23 08:36:36 +0300 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2024-10-29 00:44:28 +0300 |
commit | c5c3238d9b8cee58cd4b08bbbe9347a94a566390 (patch) | |
tree | 3385a96ef2934aae9eb1c034bee9c3855727734a /arch/hexagon/include/asm/page.h | |
parent | 6f043e75744596968b6547c4bd43e4d30bbb6d6e (diff) | |
download | linux-c5c3238d9b8cee58cd4b08bbbe9347a94a566390.tar.xz |
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/hexagon/include/asm/page.h')
-rw-r--r-- | arch/hexagon/include/asm/page.h | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/arch/hexagon/include/asm/page.h b/arch/hexagon/include/asm/page.h index 8a6af57274c2..aba4d7901305 100644 --- a/arch/hexagon/include/asm/page.h +++ b/arch/hexagon/include/asm/page.h @@ -118,12 +118,6 @@ static inline void clear_page(void *page) #define clear_user_page(page, vaddr, pg) clear_page(page) #define copy_user_page(to, from, vaddr, pg) copy_page(to, from) -/* - * page_to_phys - convert page to physical address - * @page - pointer to page entry in mem_map - */ -#define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) - static inline unsigned long virt_to_pfn(const void *kaddr) { return __pa(kaddr) >> PAGE_SHIFT; |