lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240930132321.2785718-10-jvetter@kalrayinc.com>
Date: Mon, 30 Sep 2024 15:23:20 +0200
From: Julian Vetter <jvetter@...rayinc.com>
To: Arnd Bergmann <arnd@...db.de>, Russell King <linux@...linux.org.uk>,
 Catalin Marinas <catalin.marinas@....com>, Will Deacon <will@...nel.org>,
 Guo Ren <guoren@...nel.org>, Huacai Chen <chenhuacai@...nel.org>, WANG
 Xuerui <kernel@...0n.name>, Andrew Morton <akpm@...ux-foundation.org>, Geert
 Uytterhoeven <geert@...ux-m68k.org>, Richard Henderson
 <richard.henderson@...aro.org>, Ivan Kokshaysky <ink@...assic.park.msu.ru>,
 Matt Turner <mattst88@...il.com>, "James E . J . Bottomley"
 <James.Bottomley@...senpartnership.com>, Helge Deller <deller@....de>,
 Yoshinori Sato <ysato@...rs.sourceforge.jp>, Rich Felker <dalias@...c.org>,
 John Paul Adrian Glaubitz <glaubitz@...sik.fu-berlin.de>, Richard Weinberger
 <richard@....at>, Anton Ivanov <anton.ivanov@...bridgegreys.com>, Johannes
 Berg <johannes@...solutions.net>
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
 linux-csky@...r.kernel.org, loongarch@...ts.linux.dev,
 linux-m68k@...ts.linux-m68k.org, linux-alpha@...r.kernel.org,
 linux-parisc@...r.kernel.org, linux-sh@...r.kernel.org,
 linux-um@...ts.infradead.org, linux-arch@...r.kernel.org, Yann Sionneau
 <ysionneau@...rayinc.com>, Julian Vetter <jvetter@...rayinc.com>
Subject: [PATCH v7 09/10] um: Add dummy implementation for IO memcpy/memset

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@...rayinc.com>
Signed-off-by: Julian Vetter <jvetter@...rayinc.com>
---
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






Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ