[PATCH v7 09/10] um: Add dummy implementation for IO memcpy/memset

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

 



The um arch is the only architecture that sets the config 'NO_IOMEM',
yet drivers that use IO memory can be selected. In order to make these
drivers happy we add a dummy implementation for memcpy_{from,to}io and
memset_io functions.

Reviewed-by: Yann Sionneau <ysionneau@xxxxxxxxxxxxx>
Signed-off-by: Julian Vetter <jvetter@xxxxxxxxxxxxx>
---
Changes for v7:
- New patch
---
 arch/um/include/asm/io.h | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/arch/um/include/asm/io.h b/arch/um/include/asm/io.h
index 9ea42cc746d9..f02f40609798 100644
--- a/arch/um/include/asm/io.h
+++ b/arch/um/include/asm/io.h
@@ -21,6 +21,23 @@ static inline void iounmap(void __iomem *addr)
 }
 #endif /* iounmap */
 
+static inline void memset_io(volatile void __iomem *dst, int c, size_t count)
+{
+	memset((void *)dst, c, count);
+}
+
+static inline void memcpy_toio(volatile void __iomem *to, const void *from,
+			       size_t count)
+{
+	memcpy((void *)to, from, count);
+}
+
+static inline void memcpy_fromio(void *to, const volatile void __iomem *from,
+				 size_t count)
+{
+	memcpy(to, (void *)from, count);
+}
+
 #include <asm-generic/io.h>
 
 #endif
-- 
2.34.1









[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux