[PATCH v2 10/25] asm-generic/io.h: Add a non-posted variant of ioremap()

Hector Martin marcan at marcan.st
Mon Feb 15 11:47:09 EST 2021


On 16/02/2021 00.27, kernel test robot wrote:
> config: mips-randconfig-r002-20210215 (attached as .config)
> compiler: mips64-linux-gcc (GCC) 9.3.0

>>> lib/devres.c:47:10: error: implicit declaration of function 'ioremap_np'; did you mean 'ioremap_uc'? [-Werror=implicit-function-declaration]
Well, today I learned that some architectures, like mips, only include
asm-generic/iomap.h, not asm-generic/io.h... and one, sparc64, includes
neither. That's unfortunate.

I added the missing bit to iomap.h, and a one-off patch to
arch/sparc/include/asm/io_64.h:

diff --git a/arch/sparc/include/asm/io_64.h b/arch/sparc/include/asm/io_64.h
index 9bb27e5c22f1..35470d275ddc 100644
--- a/arch/sparc/include/asm/io_64.h
+++ b/arch/sparc/include/asm/io_64.h
@@ -409,6 +409,7 @@ static inline void __iomem *ioremap(unsigned long offset, unsigned long size)
  #define ioremap_uc(X,Y)			ioremap((X),(Y))
  #define ioremap_wc(X,Y)			ioremap((X),(Y))
  #define ioremap_wt(X,Y)			ioremap((X),(Y))
+#define ioremap_np(X,Y)			ioremap((X),(Y))
  
  static inline void iounmap(volatile void __iomem *addr)
  {

David, is this okay? This series is headed for the soc tree, but I
wasn't expecting to have to touch arch-specific code for anything but
arm... you can see the rest of it here:

https://lore.kernel.org/linux-arm-kernel/YCqdi%2F5TSlbt0w%2F2@kroah.com/T/

I'll CC you on v3 if this works for you.

-- 
Hector Martin (marcan at marcan.st)
Public Key: https://mrcn.st/pub



More information about the linux-arm-kernel mailing list