um: add dummy ioremap and iounmap functions
PATCH 1/1 um: add dummy ioremap and iounmap functions
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.
--- arch/um/include/asm/io.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 arch/um/include/asm/io.h
arch/um/include/asm/io.h new file +17 -0
@@ -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
Signature · 1 line
2.1.4
Quoted 7 lines · Logan Gunthorpe
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.cwhere 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.
Quoted 5 lines · Al Viro
Quoted 3 lines
I have designs to use these functions in
scatterlist.cwhere 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.
Quoted 1 line
Incidentally, s390 has
ioremap()only whenCONFIG_PCIis 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