On Thu, Aug 18, 2022 at 11:20:59AM +0200, Linus Walleij wrote: > This enables the alpha to use <asm-generic/io.h> to fill in the > missing (undefined) I/O accessor functions. > > This is needed if Alpha ever wants to uses CONFIG_REGMAP_MMIO > which has been patches to use accelerated _noinc accessors > such as readsq/writesq that Alpha, while being a 64bit platform, > as of now not yet provide. readq/writeq is however provided > so the machine can do 64bit I/O. > > This comes with the requirement that everything the architecture > already provides needs to be defined, rather than just being, > say, static inline functions. > > Bite the bullet and just provide the definitions and make it work. > > Alternative approaches: > > - Implement proper readsq/writesq inline accessors for alpha > - Rewrite the whole world of io.h to use something like __weak > instead of relying on defines > - Leave regmap MMIO broken on Alpha because none of its drivers > use it > - Make regmap MMIO depend of !ARCH_ALPHA > > The latter seems a bit over the top. First option to implement > readsq/writesq seems possible but I cannot test it (no hardware) > so using the generic fallbacks seems like a better idea, also in > general that will provide future defaults for accelerated defines. > > Leaving regmap MMIO broken or disabling it for Alpha feels bad > because it breaks compiler coverage. > > Reported-by: kernel test robot <lkp@xxxxxxxxx> > Link: https://lore.kernel.org/linux-mm/202208181447.G9FLcMkI-lkp@xxxxxxxxx/ > Cc: Mark Brown <broonie@xxxxxxxxxx> > Cc: Arnd Bergmann <arnd@xxxxxxxx> > Cc: Richard Henderson <richard.henderson@xxxxxxxxxx> > Cc: Ivan Kokshaysky <ink@xxxxxxxxxxxxxxxxxxxx> > Cc: Matt Turner <mattst88@xxxxxxxxx> > Cc: linux-arch@xxxxxxxxxxxxxxx > Cc: linux-alpha@xxxxxxxxxxxxxxx > Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx> This patch results in the following build errors when trying to build alpha:allmodconfig. ERROR: modpost: "ioread64" [drivers/pci/switch/switchtec.ko] undefined! ERROR: modpost: "ioread64" [drivers/net/ethernet/freescale/enetc/fsl-enetc.ko] undefined! ERROR: modpost: "ioread64" [drivers/net/ethernet/freescale/enetc/fsl-enetc-vf.ko] undefined! ERROR: modpost: "iowrite64" [drivers/net/ethernet/xilinx/xilinx_emac.ko] undefined! ERROR: modpost: "iowrite64" [drivers/net/wwan/t7xx/mtk_t7xx.ko] undefined! ERROR: modpost: "ioread64" [drivers/net/wwan/t7xx/mtk_t7xx.ko] undefined! ERROR: modpost: "iowrite64" [drivers/firmware/arm_scmi/scmi-module.ko] undefined! ERROR: modpost: "ioread64" [drivers/firmware/arm_scmi/scmi-module.ko] undefined! ERROR: modpost: "iowrite64" [drivers/vfio/pci/vfio-pci-core.ko] undefined! ERROR: modpost: "ioread64" [drivers/ntb/hw/mscc/ntb_hw_switchtec.ko] undefined! Reverting it doesn't help because that just reintroduces the problem that was supposed to be fixed by this patch. Guenter