]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
um: add dummy ioremap and iounmap functions
authorLogan Gunthorpe <logang@deltatee.com>
Wed, 24 May 2017 21:42:15 +0000 (15:42 -0600)
committerRichard Weinberger <richard@nod.at>
Wed, 5 Jul 2017 21:43:14 +0000 (23:43 +0200)
The user mode architecture does not provide ioremap or iounmap, and
because of this, the arch won't build when the functions are used in some
core libraries.

I have designs to use these functions in scatterlist.c where they'd
almost certainly never be called on the um architecture but it does need
to compile.

Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Stephen Bates <sbates@raithlin.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
arch/um/include/asm/io.h [new file with mode: 0644]

diff --git a/arch/um/include/asm/io.h b/arch/um/include/asm/io.h
new file mode 100644 (file)
index 0000000..8f35d57
--- /dev/null
@@ -0,0 +1,17 @@
+#ifndef _ASM_UM_IO_H
+#define _ASM_UM_IO_H
+
+#define ioremap ioremap
+static inline void __iomem *ioremap(phys_addr_t offset, size_t size)
+{
+       return (void __iomem *)(unsigned long)offset;
+}
+
+#define iounmap iounmap
+static inline void iounmap(void __iomem *addr)
+{
+}
+
+#include <asm-generic/io.h>
+
+#endif