All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] um: add dummy ioremap and iounmap functions
@ 2017-05-24 22:00 Logan Gunthorpe
  2017-05-24 22:05 ` Al Viro
  0 siblings, 1 reply; 3+ messages in thread
From: Logan Gunthorpe @ 2017-05-24 22:00 UTC (permalink / raw)
  To: linux-kernel, user-mode-linux-devel
  Cc: Logan Gunthorpe, Stephen Bates, Jeff Dike, Richard Weinberger

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>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Richard Weinberger <richard@nod.at>
---
 arch/um/include/asm/io.h | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 arch/um/include/asm/io.h

diff --git a/arch/um/include/asm/io.h b/arch/um/include/asm/io.h
new file mode 100644
index 0000000..8f35d57
--- /dev/null
+++ b/arch/um/include/asm/io.h
@@ -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
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] um: add dummy ioremap and iounmap functions
  2017-05-24 22:00 [PATCH] um: add dummy ioremap and iounmap functions Logan Gunthorpe
@ 2017-05-24 22:05 ` Al Viro
  2017-05-24 22:09   ` Logan Gunthorpe
  0 siblings, 1 reply; 3+ messages in thread
From: Al Viro @ 2017-05-24 22:05 UTC (permalink / raw)
  To: Logan Gunthorpe
  Cc: linux-kernel, user-mode-linux-devel, Stephen Bates, Jeff Dike,
	Richard Weinberger

On Wed, May 24, 2017 at 04:00:52PM -0600, Logan Gunthorpe wrote:
> 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.

Then make it fail there.

Incidentally, s390 has ioremap() only when CONFIG_PCI is set.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] um: add dummy ioremap and iounmap functions
  2017-05-24 22:05 ` Al Viro
@ 2017-05-24 22:09   ` Logan Gunthorpe
  0 siblings, 0 replies; 3+ messages in thread
From: Logan Gunthorpe @ 2017-05-24 22:09 UTC (permalink / raw)
  To: Al Viro
  Cc: linux-kernel, user-mode-linux-devel, Stephen Bates, Jeff Dike,
	Richard Weinberger



On 24/05/17 04:05 PM, Al Viro wrote:
>> 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.
> 
> Then make it fail there.

Ok, will do. I'll send a v2 patch shortly.

> Incidentally, s390 has ioremap() only when CONFIG_PCI is set.

Hmm, ok, I'll take a peek. The kbuild robot never reported any build
issues with that architecture. I did see exactly this on the tile
architecture which I sent another patch for (that your feedback also
applies to).

Thanks for the quick review and feedback,

Logan



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-05-24 22:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-24 22:00 [PATCH] um: add dummy ioremap and iounmap functions Logan Gunthorpe
2017-05-24 22:05 ` Al Viro
2017-05-24 22:09   ` Logan Gunthorpe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.