arch/mips/include/asm/mach-ar7/ar7.h:111:24: error: implicit declaration of function 'KSEG1ADDR'; did you mean 'CKSEG1ADDR'?

From: kernel test robot
Date: Mon Apr 05 2021 - 07:56:47 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: e49d033bddf5b565044e2abe4241353959bc9120
commit: b13812ddea615b6507beef24f76540c0c1143c5c MIPS: Loongson2ef: Disable Loongson MMI instructions
date: 6 months ago
config: mips-randconfig-c003-20210405 (attached as .config)
compiler: mips64el-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b13812ddea615b6507beef24f76540c0c1143c5c
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout b13812ddea615b6507beef24f76540c0c1143c5c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

In file included from drivers/watchdog/ar7_wdt.c:29:
arch/mips/include/asm/mach-ar7/ar7.h: In function 'ar7_is_titan':
>> arch/mips/include/asm/mach-ar7/ar7.h:111:24: error: implicit declaration of function 'KSEG1ADDR'; did you mean 'CKSEG1ADDR'? [-Werror=implicit-function-declaration]
111 | return (readl((void *)KSEG1ADDR(AR7_REGS_GPIO + 0x24)) & 0xffff) ==
| ^~~~~~~~~
| CKSEG1ADDR
arch/mips/include/asm/mach-ar7/ar7.h:111:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
111 | return (readl((void *)KSEG1ADDR(AR7_REGS_GPIO + 0x24)) & 0xffff) ==
| ^
arch/mips/include/asm/mach-ar7/ar7.h: In function 'ar7_chip_id':
arch/mips/include/asm/mach-ar7/ar7.h:117:50: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
117 | return ar7_is_titan() ? AR7_CHIP_TITAN : (readl((void *)
| ^
arch/mips/include/asm/mach-ar7/ar7.h: In function 'titan_chip_id':
arch/mips/include/asm/mach-ar7/ar7.h:123:27: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
123 | unsigned int val = readl((void *)KSEG1ADDR(AR7_REGS_GPIO +
| ^
arch/mips/include/asm/mach-ar7/ar7.h: In function 'ar7_chip_rev':
arch/mips/include/asm/mach-ar7/ar7.h:130:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
130 | return (readl((void *)KSEG1ADDR(AR7_REGS_GPIO + (ar7_is_titan() ? 0x24 :
| ^
arch/mips/include/asm/mach-ar7/ar7.h: In function 'ar7_device_enable':
arch/mips/include/asm/mach-ar7/ar7.h:157:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
157 | (void *)KSEG1ADDR(AR7_REGS_RESET + AR7_RESET_PERIPHERAL);
| ^
arch/mips/include/asm/mach-ar7/ar7.h: In function 'ar7_device_disable':
arch/mips/include/asm/mach-ar7/ar7.h:165:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
165 | (void *)KSEG1ADDR(AR7_REGS_RESET + AR7_RESET_PERIPHERAL);
| ^
arch/mips/include/asm/mach-ar7/ar7.h: In function 'ar7_device_on':
arch/mips/include/asm/mach-ar7/ar7.h:178:20: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
178 | void *power_reg = (void *)KSEG1ADDR(AR7_REGS_POWER);
| ^
arch/mips/include/asm/mach-ar7/ar7.h: In function 'ar7_device_off':
arch/mips/include/asm/mach-ar7/ar7.h:185:20: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
185 | void *power_reg = (void *)KSEG1ADDR(AR7_REGS_POWER);
| ^
cc1: some warnings being treated as errors


vim +111 arch/mips/include/asm/mach-ar7/ar7.h

7ca5dc145bc7da Florian Fainelli 2009-06-24 108
238dd317f74250 Florian Fainelli 2010-08-29 109 static inline int ar7_is_titan(void)
238dd317f74250 Florian Fainelli 2010-08-29 110 {
238dd317f74250 Florian Fainelli 2010-08-29 @111 return (readl((void *)KSEG1ADDR(AR7_REGS_GPIO + 0x24)) & 0xffff) ==
238dd317f74250 Florian Fainelli 2010-08-29 112 AR7_CHIP_TITAN;
238dd317f74250 Florian Fainelli 2010-08-29 113 }
238dd317f74250 Florian Fainelli 2010-08-29 114

:::::: The code at line 111 was first introduced by commit
:::::: 238dd317f74250983aefbde6dc0a1f345a717993 MIPS: AR7: Add support for Titan (TNETV10xx) SoC variant

:::::: TO: Florian Fainelli <florian@xxxxxxxxxxx>
:::::: CC: Ralf Baechle <ralf@xxxxxxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip