On Thu, Apr 28, 2022 at 8:20 AM Kefeng Wang <wangkefeng.wang@xxxxxxxxxx> wrote: > On 2022/4/28 2:20, Arnd Bergmann wrote: > > On Wed, Apr 27, 2022 at 2:14 PM Kefeng Wang <wangkefeng.wang@xxxxxxxxxx> wrote: > > > > bool arch_ioremap_check(phys_addr_t addr, size_t size, unsigned long prot); > > #define arch_ioremap_check arch_ioremap_check > Ok, I could use this way, and keep consistent with others definitions in > asm/io.h > > (or alternatively an extern declaration, if the implementation is nontrivial) > > > > It may be worth pointing out that either way requires including > > asm-generic/io.h, > > which most architectures don't. This is probably fine, as only csky, riscv and > > now arm64 use CONFIG_GENERIC_IOREMAP, and we can probably require > > that any further architectures using this symbol also have to use > > asm-generic/io.h. > > It looks the arch is already include it, > > $ git grep "asm-generic/io.h" arch/ > > arch/arc/include/asm/io.h:#include <asm-generic/io.h> > arch/arm/include/asm/io.h:#include <asm-generic/io.h> > arch/arm64/include/asm/io.h:#include <asm-generic/io.h> > arch/csky/include/asm/io.h:#include <asm-generic/io.h> > arch/h8300/include/asm/io.h:#include <asm-generic/io.h> > arch/ia64/include/asm/io.h:#include <asm-generic/io.h> > arch/m68k/include/asm/io.h:#include <asm-generic/io.h> > arch/m68k/include/asm/io_no.h: * that behavior here first before we > include asm-generic/io.h. > arch/microblaze/include/asm/io.h:#include <asm-generic/io.h> > arch/nios2/include/asm/io.h:#include <asm-generic/io.h> > arch/openrisc/include/asm/io.h:#include <asm-generic/io.h> > arch/powerpc/include/asm/io.h:#include <asm-generic/io.h> > arch/riscv/include/asm/io.h:#include <asm-generic/io.h> > arch/s390/include/asm/io.h:#include <asm-generic/io.h> > arch/sparc/include/asm/io_32.h:#include <asm-generic/io.h> > arch/um/include/asm/io.h:#include <asm-generic/io.h> > arch/x86/include/asm/io.h:#include <asm-generic/io.h> > arch/xtensa/include/asm/io.h:#include <asm-generic/io.h> Right, it's mostly the older architectures that never started using asm-generic/io.h: $ git grep -L asm-generic/io.h arch/*/include/asm/io.h arch/alpha/include/asm/io.h arch/hexagon/include/asm/io.h arch/mips/include/asm/io.h arch/parisc/include/asm/io.h arch/sh/include/asm/io.h arch/sparc/include/asm/io.h # it is used on sparc32 That's actually less than I expected, and most of these are not seeing a lot of upstream work any more. Arnd