[PATCH] asm-generic: define IOMEM for assembly as well

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In interest of type safety, we should start using IOMEM() for register
MMIO base addresses that we keep in headers for PBL. Some of these
addresses are used from assembly code as well, so define IOMEM() for
that case.

Signed-off-by: Ahmad Fatoum <ahmad@xxxxxx>
---
 include/asm-generic/io.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h
index e41b4df40366..51f65ceb0a2e 100644
--- a/include/asm-generic/io.h
+++ b/include/asm-generic/io.h
@@ -442,7 +442,11 @@ static inline void *phys_to_virt(unsigned long phys)
 #endif
 
 #ifndef IOMEM
+#ifndef __ASSEMBLY__
 #define IOMEM(addr)	((void __force __iomem *)(addr))
+#else
+#define IOMEM(addr)	addr
+#endif
 #endif
 
 #define __io_virt(x) ((void __force *)(x))
-- 
2.38.1





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux