aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arc
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2024-10-23 07:36:36 +0200
committerArnd Bergmann <arnd@arndb.de>2024-10-28 21:44:28 +0000
commitc5c3238d9b8cee58cd4b08bbbe9347a94a566390 (patch)
tree3385a96ef2934aae9eb1c034bee9c3855727734a /arch/arc
parentasm-generic/io.h: Remove I/O port accessors for HAS_IOPORT=n (diff)
downloadlinux-rng-c5c3238d9b8cee58cd4b08bbbe9347a94a566390.tar.xz
linux-rng-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/arc')
-rw-r--r--arch/arc/include/asm/io.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/arch/arc/include/asm/io.h b/arch/arc/include/asm/io.h
index f57cb5a6b624..00171a212b3c 100644
--- a/arch/arc/include/asm/io.h
+++ b/arch/arc/include/asm/io.h
@@ -42,9 +42,6 @@ static inline void ioport_unmap(void __iomem *addr)
#define iowrite16be(v,p) ({ __iowmb(); __raw_writew((__force u16)cpu_to_be16(v), p); })
#define iowrite32be(v,p) ({ __iowmb(); __raw_writel((__force u32)cpu_to_be32(v), p); })
-/* Change struct page to physical address */
-#define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT)
-
#define __raw_readb __raw_readb
static inline u8 __raw_readb(const volatile void __iomem *addr)
{